Most recent file selection with WinSCP command line
https://winscp.net/eng/docs/script_download_most_recent_file
Advertisement
Advertisement
You cannot do this on command-line only. If it was possible, the solution in WinSCP documentation would show it instead of the use of wrapper script.
The closest you can get with command-line only is using file mask with time constraint. For example, if you know that one file per day is added only, you can use*>1D
mask to select files (one file actually) created within the last 24 hours.
How do i achieve this using winscp command line automation commands?
https://winscp.net/eng/docs/script_download_most_recent_file
There should be NO space betweenmy command currently reads "get //ftp05155/FTP*.* <1d"
*.*
and the time constraint + It should be >
, not <
.
Advertisement
"C:\Program Files\WinSCP5.7\WinSCP.com" ^ /log="C:\Program Files\WinSCP5.7\WinSCP.log" /ini=nul ^ /command ^ "open ftp://electpub:elmelm5@obp-ftp.oxon.blackwellpublishing.com/" ^ "get *.zip /ElecMediaOUT/ -filemask>=2H H:\FTP-Blackwell\" ^ "exit"
It should probably be:Pls let me know the correct syntax to be used for "get" with "filemask" script in a batch file.
"get /ElecMediaOUT/*.zip -filemask>=2H H:\FTP-Blackwell\" ^
We need a complete log file to help you.Can help me with that.
Advertisement
You can post new topics in this forum