Topic "get and mv commands"

Author Message
[View user's profile]

Joined: 2006-10-19
Posts: 2

Considering following script:

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

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?

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24759
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:
Martin Prikryl

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License