I want to delete the files from local directory once i have synchronized with remote directory.
Here is my script,
#Resources Can be Found here - https://winscp.net/eng/docs/scripting
option batch abort
option confirm off
open scp://XXX:YYY@localhost -hostkey="ZZZ"
synchronize remote -delete [local directory] [remote directory]
With the above script, files are getting deleted in remote directory.
If i use the below script, then files from remote is getting synchronized to my local.
synchronize local -delete [local directory] [remote directory]
If i switch the directory then i get an error,
synchronize local -delete [remote directory] [local directory]