Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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


Re: How to pass individual commands at command line ?

There's no command "mv". You need to use "get".

How to pass individual commands at command line ?

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