I would like to use this as a first going, after which I would like to incorporate email confirmations. Which leads me to my second question - is it possible to output which of files have been either synchornized or do not require synchronization, and have the output sent by email? Would XML logging be the most simplistic means? Any examples anyone can provided?
Third and lastly, would be possible to execute an external command after each file has been synchronized? Ie., I would like to run an unzip command if the file have been updated, and move the files to a separate directory.
winscp.com /script="F:\Scripts\ScriptNotificationTest.txt" /log="F:\Scripts\FTPNotificationTestLog.txt" if errorlevel 1 goto error echo Synchronization Successful. goto end :error echo Synchronization Failed. end:
#Automatically abort script on errors option batch abort #Disable overwrite confirmations that conflict with the previous option confirm off #Connect to ******* server using existing login credentials open ******* #Synchronize database releases #Synchronize Test Zip synchronize local -criteria=time -resumesupport=on -filemask="TestZipFile.zip" "F:\*******\Databases\Stage\Test\" #Synchronize Test Zip 2 synchronize local -criteria=time -resumesupport=on -filemask="TestZipFile2.zip" "F:\*******\Databases\Stage\Test\"