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

Author Message
bala_ganesh
[View user's profile]

Joined: 2016-02-18
Posts: 2
Location: India
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
The batch file looks ok. Works for me.

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

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License