Home > Blockchain >  Powershell/CMD is not recognizing PATH variable
Powershell/CMD is not recognizing PATH variable

Time:12-24

Windows 11/ Powershell 7.2.1

I've added the following variables to user PATH and system PATH. C:\Program Files\rclone\rclone-v1.57.0-windows-amd64\rclone.exe

When I try to run rclone from Powershell or cmd I get the following message:

PS C:\Windows\System32> rclone rclone: The term 'rclone' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Sucessfully ran refreshenv and just to be sure I restarted Windows. After running $env:path -split ";" I can see C:\Program Files\rclone\rclone-v1.57.0-windows-amd64\rclone.exe is set correctly.

I can run rclone from within the program folder I get this notice.

PS C:\Program Files\rclone\rclone-v1.57.0-windows-amd64> rclone rclone: The term 'rclone' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Suggestion [3,General]: The command rclone was not found, but does exist in the current location. PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\rclone". See "get-help about_Command_Precedence" for more details.

After setting rclone on PATH it still isn't "seen", what am I doing wrong here?

CodePudding user response:

You have to specify the directory containing the rclone.exe not the path of the executable. You should add C:\Program Files\rclone\rclone-v1.57.0-windows-amd64 to the PATH enveronement not C:\Program Files\rclone\rclone-v1.57.0-windows-amd64\rclone.exe

  • Related