You have a source local (or remote) folder, where new files are being added by some external process. You want to make sure that these files gets regularly transferred to remote (or local) folder. And you want to remove the source local (or remote) files once they are safely transferred.
First of all, such an operation should not be called synchronization, as it does not end with source and destination folders being synchronized. Anyway, leaving a terminology aside…
Supposing you never end with the same file being both in source and destination folder, you can simply move the files to the destination folder.
If it can happen that the same file is both in source and destination folder, you can use synchronization and delete only transferred files afterward.
If you need more control (like if you want to delete the files only after all of them are transferred successfully), you can implement this easily using WinSCP .NET assembly. See example Deleting remote files after successful remote to local synchronization.
If you do not want to use .NET assembly: Perform the synchronization using
synchronize command. Make sure the script generates XML log file. You can then parse the log file to enumerate files that got successfully transferred, and use the list, to generate script to delete the source copies.
Site design by Black Gate