Topic "get and mv commands"

Author Message
natha
[View user's profile]

Joined: 2006-10-19
Posts: 2
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License