Reputation: 103
This is strange: in general, .bat scripts work fine on this machine. So the PATH variable is fine.
However, I have one script that creates the error message
--> 'C:\Windows\system32\cmd.exe\' is not recognized as an internal ....
Here is the one-line script:
--> @echo %1 | "C:\Program Files\putty\PSFTP.exe" -pw xxx User@Host
This script is working fine on two other Windows 7 machines, just not on mine. Any ideas what to check?
Upvotes: 1
Views: 970
Reputation: 103
Actually, the problem had nothing to do with the specific command. Even a dir | dir from the command line threw the same error. I did find the solution here: https://superuser.com/questions/557387/pipe-not-working-in-cmd-exe-on-windows-7 Problem was the environment variable ComSpec; somehow it had a bad character in the field. I removed that darn back-slash and all is fine.
Thanks for looking at my problem.
Upvotes: 0
Reputation: 51
Is it possible you are using a 64bit version of Windows?. The path may need to be set to point to "C:\Program Files (x86)\Putty"
Upvotes: 1