get and mv commands

Advertisement

natha
Joined:
Posts:
2

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

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

Reply with quote

Advertisement

You can post new topics in this forum