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

martin

Re: get and mv commands

natha wrote:

Or will it move also files that have been added in the meanwhile?

This is true.

To move just downloaded files, use XML logging, parse the log to find out what files were transferred, and generate move script based on that.

I'm in process of creating some examples for tasks like that. You can see incomplete article at:
https://winscp.net/eng/docs/guide_interpreting_xml_log
natha

get and mv commands

Hi,

Considering following script:

option batch abort
option confirm off
open <SomeName>
cd /UNRATED
option transfer binary
get *.txt E:\DATA\SUPPLIERS\
mv *.txt /UNRATED/Archive/
close
exit

Will the "mv" command only move the files downloaded with the "get" command?
Or will it move also files that have been added in the meanwhile?

I explain myself:
Let's say I "get" 100 files.
After command finished executing, 1 more file is added in remote directory.
Will the "mv" move 100 or 101 files?

Thanx