Delete files at local if deleted from remote
Hi there,
I was wanting to achieve the following, could you please enlighten me?
Future
I'm wanting to sync local (target) directory with remote (source) directory. So:
[1] any files updated at remote should get downloaded to my local directory after the sync
[2] any files deleted at remote should get deleted in my local directory after the sync
[3] any files added at remote should get added to my local directory after the sync
Current
At the moment, with the code below, I'm getting [1] and [3] from the list above.
How do I achieve Future scenario #[2]? I've read about using the
option, would that achieve the end result?
Potential update to the code?
Thanks,
Clyde
I was wanting to achieve the following, could you please enlighten me?
Future
I'm wanting to sync local (target) directory with remote (source) directory. So:
[1] any files updated at remote should get downloaded to my local directory after the sync
[2] any files deleted at remote should get deleted in my local directory after the sync
[3] any files added at remote should get added to my local directory after the sync
Current
At the moment, with the code below, I'm getting [1] and [3] from the list above.
option batch abort option confirm Off open sftp://username:password@server -hostkey="ssh-rsa 2048 mac-address" synchronize local local-directory remote-directory -filemask="|*.*_" exit
How do I achieve Future scenario #[2]? I've read about using the
-delete
option, would that achieve the end result?
Potential update to the code?
synchronize local local-directory remote-directory -filemask="|*.*_" -delete
Thanks,
Clyde