Topic "How to pass individual commands at command line ?"

Author Message
[View user's profile]

Joined: 2006-10-18
Posts: 22
I want to establish a WinSCP session through command line and pass some commands.

The tasks which should be done are e.g.

1.) COnnect to server
with user aaa and password bbb
2.) look in subfolder /mysample123
3.) if there are some files matching *.dat
then move them to the local folder
4.) Close session

How do I pass all these information in ONE WinSCP command line ?

Or is it better to use a batch file mybatch.txt
which contains all sub commands?

How do I pass the batch file name?

winscp.exe aaa:bbb@ /mysample123 /command "mv *.dat D:\data\fromremote"

does NOT work

Thank you
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27083
Location: Prague, Czechia
There's no command "mv". You need to use "get".
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