Synchronize Script to add newly added files to a seperate local directory
I am trying to write a script that will synchronize only new and updates files (for the last day/week) from a sftp/ftp site to a local directory. I am able to crate the local directory and copy all files off the ftp site. However, when I add -filemask for a given # of days or specific data the script pulls nothing.
I've tried several times with Syncronize and get and cannot seem to pull only files created before/after certain dates or new files added.
version: 5.9.3(Build 7136)
I've tried several times with Syncronize and get and cannot seem to pull only files created before/after certain dates or new files added.
version: 5.9.3(Build 7136)
rem Generate Temp Script @echo off setlocal set folder=%date:~10,4%%date:~4,2%%date:~7,2% set script=FTPScript.txt echo option confirm off >> "%script%" echo open FTP_TEST >> "%script%" echo synchronize -filemask="<2016-12-08 00:00:00" local "C:\Users\User\Desktop\FTP_TEST\%folder%\" "/sftp/FTP_TEST/" >> "%script%" :echo get -filemask="<2016-12-08 00:00:00" /sftp/FTP_TEST/* "C:\Users\User\Desktop\FTP_TEST\%folder%"\ >> "%script%" echo close >> "%script%" echo exit >> "%script%" rem Create Date folder in Local Environment set folder=%date:~10,4%%date:~4,2%%date:~7,2% cd "C:\Users\User\Desktop\FTP_TEST\ mkdir %folder% cd %folder% rem Execute Script "C:\Program Files (x86)\Winscp\winscp.exe" /script="C:\Users\User\Desktop\DateApp\FTPScript.txt" /log="C:\Users\User\Desktop\DateApp\FTPScriptRun.log" rem Delete temporary script del "C:\Users\User\Desktop\DateApp\FTPScript.txt" exit