Multiple folder sync
I am trying to do the multiple folder sync using winscp. My source machine is Unix machine and I did install WINSCP at windows server and syncing log folders from Unix machine to Windows machine. We wrote ASP.net scrip which will call this sync script. Following is my script and first folder sync looks good and second folder is not. Can some please help me the better way to do this?
option batch on
option confirm off
open sftp://sseftp@host -privatekey="C:\Program Files\WinSCP\hostpriv.ppk" -timeout=600
option transfer binary
synchronize local "C:\Inetpub\wwwroot\wiatlog\logs" /usr/pos/sma/wt/logs
synchronize local "C:\Inetpub\wwwroot\wiatlog\logs" /usr/pos/sma/wt/data/wt/logs
close
exit
option batch on
option confirm off
open sftp://sseftp@host -privatekey="C:\Program Files\WinSCP\hostpriv.ppk" -timeout=600
option transfer binary
synchronize local "C:\Inetpub\wwwroot\wiatlog\logs" /usr/pos/sma/wt/logs
synchronize local "C:\Inetpub\wwwroot\wiatlog\logs" /usr/pos/sma/wt/data/wt/logs
close
exit