Topic "Download order ??"

Author Message
Guest




Hi, I'm using Winscp to 'get -delete' all files and directories from one server and copy to another server using a batch file which uses parses parameters to a .conf file. The order in which the files are copied appears to be completely random. Typically most programs will copy in alphabetical order. How does Winscp determine the order in which to copy? Is there anyway to make Winscp copy in alphabetical order?

This is an example of the order in which winscp is copying.
20150302_123851.mkv
20150302_104348.mkv
20150302_131852.mkv
20150302_133353.mkv
20150302_102356.mkv


Here are my script files.

#batch file contents

winscp.com" /xmllog="C:\Logs\log.xml" /loglevel=0 /script=C:\WinSCP\winscp.conf /parameter 192.168.2.1 /media/path1 \\172.16.1.120\path2\


#winscp.conf contents

option batch continue
open sftp://user:pass@%1%/ -timeout=60 -rawsettings SendBuf=0
option confirm off
get -delete -resume %2%/*.* %3%
close
exit
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
As most programs, WinSCP downloads the files in the order as they are presented by the server.
_________________
Martin Prikryl
Guest




Hi Martin, thank you for your reply. What I am trying to achieve is downloading the files in the correct order. One workaround I thought of was using multiple get commands with wild cards, to match files in the correct order (e.g. *_00*.mkv, *_01*.mkv etc)

The files I need to copy are a few levels down and the interim folders are variable. e.g.

/media/path1/variable1/variable2/20150302_003851.mkv \\172.16.1.120\path2\variable1\variable2\

I've tried using the following and a few other variations, but it does not work:

get -delete /media/path1/*/*/*_00*.mkv \\172.16.1.120\path2\

If I use the full path it works:

get -delete /media/path1/variable1/variable2/*_00*.mkv \\172.16.1.120\path2\variable1\variable2\

Is there anyway I can give wildcard for the interim folders?
Guest




Disregard, I figured out how to do this:

get -delete -resume -filemask=*_00*.mkv %2% %3%
get -delete -resume -filemask=*_01*.mkv %2% %3%
get -delete -resume -filemask=*_02*.mkv %2% %3%
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
That's correct. Thanks for sharing your solution.
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