WinSCP can first get the file list from remote, sort it, and then start downloading in the alphabetical order.
Why cant it do that?
That's correct. Thanks for sharing your solution.
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%
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.
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?
As most programs, WinSCP downloads the files in the order as they are presented by the server.
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.
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\
option batch continue
open sftp://user:pass@%1%/ -timeout=60 -rawsettings SendBuf=0
option confirm off
get -delete -resume %2%/*.* %3%