Re: need synchronize the directories and files of 2015, but not the entire year, just May and Sept.
The actual problem are the quotes.
This is correct:
And then the argument order does not matter. This would still work:
See https://winscp.net/eng/docs/commandline#syntax
In your version, I'm pretty sure that the "08:10:00" part was ignored.
Also, the
So a full correct script is like:
This is correct:
"synchronize local C:\Sabic\JOURNAL /Journals/TRASVAL -filemask=""*>2016-09-20 08:10:00""" ^
And then the argument order does not matter. This would still work:
"synchronize local -filemask=""*>2016-09-20 08:10:00"" C:\Sabic\JOURNAL /Journals/TRASVAL" ^
See https://winscp.net/eng/docs/commandline#syntax
In your version, I'm pretty sure that the "08:10:00" part was ignored.
Also, the
/log
must be at the very end (or before the /command
). Otherwise the close
and exit
commands are never invoked.
So a full correct script is like:
WinSCP.com /command ^
"option batch abort" ^
"open ftp://ftpmetropolitano:ftpmetro@192.168.x.x/" ^
"synchronize local ""-filemask="*>=2016-06-01 00:00:00"" C:\Sabic\JOURNAL /Journals/TRASVAL/" ^
"close" ^
"quit" ^
/log="C:\LOGS_JOURNALS\logsdelScript_!Y_!M_!D_!T.log" /loglevel=1