Post a reply

Options
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)

Options

Topic review

Dman100

SecureFTP problem in batch script

I'm trying to write a batch script that transfers files using secureFTP with the WinSCP application.

The script runs and authenticates but seems to stop once the active session starts and leaves the command window open at winscp>

it doesn't put (transfer) my file.

Can anyone help?

Here is my batch script:

cd c:\
cd Program Files (x86)\WinSCP
winscp username:password@secureftp.mycompany.com
cd myTestDirectory
lcd c:\
put test.txt
exit

It seems to stop on cd myTestDirectory. When I run my batch file it just leaves the command console open at winscp>
It definitely shows that it authenticated correctly.

Thanks for any help.