Differences
This shows you the differences between the selected revisions of the page.
2013-07-23 | 2013-08-02 | ||
library_example_delete_after_successful_download (martin) | favout .net for this task (martin) | ||
Line 12: | Line 12: | ||
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 it can happen that the same file is both in source and destination folder, you can use synchronization and delete only transferred files afterward. | ||
- | Perform the synchronization using ''[[scriptcommand_synchronize|synchronize]]'' command. Make sure the script generates [[logging_xml|XML log file]]. You can then [[logging_xml#parse|parse]] the log file to enumerate files that got successfully transferred, and use the list, to generate script to delete the source copies. | + | You can implement this easily using [[library|WinSCP .NET assembly]]. See example [[library_example_delete_after_successful_download|Deleting remote files after successful remote to local synchronization]]. |
+ | |||
+ | If you do not want to use .NET assembly: Perform the synchronization using ''[[scriptcommand_synchronize|synchronize]]'' command. Make sure the script generates [[logging_xml|XML log file]]. You can then [[logging_xml#parse|parse]] the log file to enumerate files that got successfully transferred, and use the list, to generate script to delete the source copies. | ||
- | It might be easier for you to use [[library|WinSCP .NET assembly]] for such task. See example [[library_example_delete_after_successful_download|Deleting remote files after successful remote to local synchronization]]. | ||
~~NOTOC~~ | ~~NOTOC~~ | ||