- martin
Post a reply
Topic review
- noahnu
Conditional File Download/Sync
Hello, I am new to WinSCP scripting.
Basically I have a script that syncs a local folder with one on a server:
My issue is that I only want WinSCP to download the JPG IF there is an associating txt file with the same name. For example if there is a JPG called hello.jpg then it should only download if the file hello.txt exists. How do I do this? Would I need to rely on custom code for the sync instead of the synchronize command?
Thanks,
Noah NU
Basically I have a script that syncs a local folder with one on a server:
option batch off
option confirm off
open ftp://username:password@server:21
option include "*.jpg; *.txt"
synchronize local -criteria=time "%1%" "%2%"
exit
My issue is that I only want WinSCP to download the JPG IF there is an associating txt file with the same name. For example if there is a JPG called hello.jpg then it should only download if the file hello.txt exists. How do I do this? Would I need to rely on custom code for the sync instead of the synchronize command?
Thanks,
Noah NU