Hello!
How can I make the program automatically delete only those files from the original source that have been successfully synchronized?
...
EDIT: Okay, I found the answer by searching the forum more thoroughly.
Delete original files after sync
- Posts: 1
- Joined: 1 Feb 2026
- Posts: 6
- Joined: 31 Jan 2023
Do tell.
There are too many posts requesting this feature and none that I read that offers a solution.
Can you respond with the link to a post that describes how to emulate a "move" operation? Ideally, it could include using "exclude" filters to preserve identified files.
There are too many posts requesting this feature and none that I read that offers a solution.
Can you respond with the link to a post that describes how to emulate a "move" operation? Ideally, it could include using "exclude" filters to preserve identified files.
- Posts: 170
- Joined: 5 Jan 2024
One way is a post sync command.
No guarantees all of these commands are 100%.
FreeFileSync is fundamentally a synchronization tool, so it doesn't have a "Move" button by default. However, you can achieve an auto-delete behavior using a Post-Sync Command.
This is the safest way to ensure files are only deleted once the sync is confirmed successful.
How to set it up:
* Configure your Sync:
* Set your folders (Left = Source, Right = Destination).
* Open Synchronization Settings (the green gear icon or press F8).
* Select the Update variant. This ensures that files already on the destination aren't accidentally deleted if you've cleared them from the source previously.
* Add the Auto-Delete Command:
* In the same Synchronization settings window, look for the On completion section at the bottom.
* In the text box, enter a command to clear the source folder.
* For Windows:
cmd /c "del /q /s "C:\Path\To\Source\*""
(Replace C:\Path\To\Source\ with your actual source path. The /q is for quiet mode and /s is for subdirectories.)
* For macOS/Linux:
rm -rf /Path/To/Source/*
* Run and Save:
* Run a Compare and then Synchronize.
* Once the progress bar hits 100% and the sync is successful, FreeFileSync will trigger the command and wipe the source.
⚠️ Important Warnings
* No Undo: Commands executed "On completion" bypass the Recycle Bin. Ensure your sync is 100% correct before automating this.
* Test First: I strongly recommend testing this with a "dummy" folder containing unimportant files before applying it to your main data.
* Failed Syncs: If the synchronization fails or is cancelled, FreeFileSync will not run the completion command, which protects your files from being deleted before they are safely moved.
An Alternative (The "Dummy Folder" Trick)
If you aren't comfortable with command lines, some users use a "Two-Step" batch:
* Sync 1: Mirror/Update from Folder A to Folder B.
* Sync 2: Mirror an empty folder into Folder A.
This effectively "syncs" the emptiness into your source, deleting everything there.
No guarantees all of these commands are 100%.
FreeFileSync is fundamentally a synchronization tool, so it doesn't have a "Move" button by default. However, you can achieve an auto-delete behavior using a Post-Sync Command.
This is the safest way to ensure files are only deleted once the sync is confirmed successful.
How to set it up:
* Configure your Sync:
* Set your folders (Left = Source, Right = Destination).
* Open Synchronization Settings (the green gear icon or press F8).
* Select the Update variant. This ensures that files already on the destination aren't accidentally deleted if you've cleared them from the source previously.
* Add the Auto-Delete Command:
* In the same Synchronization settings window, look for the On completion section at the bottom.
* In the text box, enter a command to clear the source folder.
* For Windows:
cmd /c "del /q /s "C:\Path\To\Source\*""
(Replace C:\Path\To\Source\ with your actual source path. The /q is for quiet mode and /s is for subdirectories.)
* For macOS/Linux:
rm -rf /Path/To/Source/*
* Run and Save:
* Run a Compare and then Synchronize.
* Once the progress bar hits 100% and the sync is successful, FreeFileSync will trigger the command and wipe the source.
⚠️ Important Warnings
* No Undo: Commands executed "On completion" bypass the Recycle Bin. Ensure your sync is 100% correct before automating this.
* Test First: I strongly recommend testing this with a "dummy" folder containing unimportant files before applying it to your main data.
* Failed Syncs: If the synchronization fails or is cancelled, FreeFileSync will not run the completion command, which protects your files from being deleted before they are safely moved.
An Alternative (The "Dummy Folder" Trick)
If you aren't comfortable with command lines, some users use a "Two-Step" batch:
* Sync 1: Mirror/Update from Folder A to Folder B.
* Sync 2: Mirror an empty folder into Folder A.
This effectively "syncs" the emptiness into your source, deleting everything there.
- Posts: 6
- Joined: 31 Jan 2023
Option 1 allows the user to write a "customized" script that could prune/delete any set of files I guess. I'll play around with a post-execute command. Probably will only list files it would delete for a while to monitor...
Option 2 allows for managing a set of files on the Right that you want to always exist/remain on the Left, rather than having to exclude them if using Option 1.
Thanks for the obvious hint, even though it's not using a built-in "move" capability.
Option 2 allows for managing a set of files on the Right that you want to always exist/remain on the Left, rather than having to exclude them if using Option 1.
Thanks for the obvious hint, even though it's not using a built-in "move" capability.
- Posts: 170
- Joined: 5 Jan 2024
It's the best I could come up with.