[SOLVED]Cannot pass password with --password-command, error "executable file not found in %PATH%"

What is the problem you are having with rclone?

Trying to use --password-command to pass the config password in cmd.exe on windows.
Always getting error that "executable file not found in %PATH%"

the command for --password-command, "type rclone.txt", is working if input directly in cmd.exe

What is your rclone version?

1.57.0 Windows

Which cloud storage system are you using?

box

The command you were trying to run

rclone --password-command "type password.txt" remote: Q:

//note: the "remote:" is not exactly the same I used, changed to remove personal info.

The rclone config contents with secrets removed.

//Doesn't seem to related to this problem.

A log from the command with the -vv flag

2021/12/31 02:26:54 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "-vv" "--password-command" "type rclone.txt" "mount" "remote:" "Q:"]
2021/12/31 02:26:54 DEBUG : Creating backend with remote "remote:"
2021/12/31 02:26:54 ERROR : Using --password-command returned: exec: "type": executable file not found in %PATH%
2021/12/31 02:26:54 Failed to load config file "C:\*************\rclone.conf": password command failed: exec: "type": executable file not found in %PATH%

//modified the remote name and the path of rclone config to remove personal info..

Hello, welcome to the forum.

The reason is type is not an executable, but a Windows Command shell built-in command. Therefore, if you try cmd /c type rclone.txt instead, I think it should work.

worked.
Thank you very much!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.