Topic "SecureFTP problem in batch script"

Author Message
[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
cd myTestDirectory
lcd c:\
put test.txt

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.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26889
Location: Prague, Czechia
You need to put your WinSCP commands into separate script file.
Please read guide to scripting:
Martin Prikryl

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License