Getting error "Winscp is not recognized as an internal or external command"

Advertisement

bala_ganesh
Joined:
Posts:
2
Location:
India

Getting error "Winscp is not recognized as an internal or external command"

Hi All,

Please find below my script. If I run the commands separately, I am not facing any issue. But I saved the script with .bat extension. I am getting "Winscp is not recognized as an internal or external command" while running the batch file. Please let me know what mistake I am doing.

@echo off

set x=%DATE:~0,3%
set y=%x%__catalog
SET y
CALL :LoCase y
SET y

cd "C:\Program Files (x86)\WinSCP\"
WinSCP.com /console /command "option batch on" "option confirm off" "open sourcing" "cd /catalog/USA/" "get %y%.txt D:\Scripts\Catalog\USA\" "exit"

LoCase
FOR %%i IN ("A=a" "B=b" "C=c" "D=d" "E=e" "F=f" "G=g" "H=h" "I=i" "J=j" "K=k" "L=l" "M=m" "N=n" "O=o" "P=p" "Q=q" "R=r" "S=s" "T=t" "U=u" "V=v" "W=w" "X=x" "Y=y" "Z=z") DO CALL SET "%1=%%%1:%%~i%%"
GOTO:EOF

exit

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,392
Location:
Prague, Czechia

Re: Getting error "Winscp is not recognized as an internal or external command"

The batch file looks ok. Works for me.

Do you have WinSCP installed to C:\Program Files (x86)\WinSCP\?

Reply with quote

Advertisement

You can post new topics in this forum