Execute WinSCP from a batch file
I want to execute winscp script from a batch file.
Assume the following contents are in
echo " OPENING THE SESSION " winscp.com /console /command:"open xyz:abc@ipaddress" echo "CONNECTED TO THE VM " REM delete old files rm file1.tar
C:\>MYFILE.BAT, I am able to connect to unix vm, however it goes into shell mode and second command (deleting
file1.tarwon't get executed). do we need to give any other parameter?
I know we can execute batchfile itself from winscp directory (eg:
winscp.com /script:filename.bat) but in that case i can't check errors with if/ else conditions in batch file since winscp doesn't recognise the if/else.
Any suggestions please? i don't want to use xml logging as it looks too complicated for my use.