Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


How does that relate to WinSCP script?

But it seems that .Net framework uses above command.
Sorry if I am wrong.

Unknown command if

Hi guys,

I am executing script from windows using batch file and calling winscp internally, i want to perform conditional operation on linux server.
When I execute any if statement it gives me unknown command if.

Please help me, I just need to check if file exists on particular linux path, if not then move file from one linux path to above linux path.

If/else or if file exists commands possible?

I am using scripting and basically trying to first check if a file already exist. If it does, then I want to cancel the rest of the script. I can "fake" this by adding this to my script:

call if [ -d %MY_FILE_NAME% ]; then echo "Already using current version"; exit; fi

as that breaks the "session" and causes all other commands to just crap out with
No Session.
No Session.
No Session.
No Session.

but is it possible to have a clean exit from the winscp script itself?