Topic "SecureFTP problem in batch script"

Author Message
Dman100
[View user's profile]

Joined: 2012-05-09
Posts: 1
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
You need to put your WinSCP commands into separate script file.
Please read guide to scripting:
http://winscp.net/eng/docs/guide_automation
_________________
Martin Prikryl
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