[Feature Request] delete before copy

Discuss new features and functions
Posts: 1
Joined: 19 May 2015

relealyu

Hi zenju and thanks for the great work.
I have a problem when synchronizing in Mirror mode in which FreeFileSync complains about not enough free space. But actually that happens because it tries to copy files from left to right and then delete the ones no longer needed after.
I wonder if there's a way to get FreeFileSync to first delete items from right and when there's enough space availabe, start copying others from left.

Thanks in advance
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

FreeFileSync already does this, but you also need to consider these options:

1. deletion handling "recycle bin": moving files to the recycler in general does not free space

2. fail-safe file copy: FFS will copy to a temporary file first, which creates a short-lived spike of additional disk space consumption of the target file size. However I would not suggest to disable this setting in order to prevent data corruption during unexpected external failures (network drop, power loss, os crash...)
Posts: 1
Joined: 10 May 2017

seyss

Zenju, this won't delete all files first like relealyu wanted.. I want it too!! Any way to do this?
Delete first, then copy.
Thanks!
User avatar
Posts: 2450
Joined: 22 Aug 2012

Plerry

If you really need/want this, and the way FFS presently performs does not fulfill your needs, you might define two separate syncs.
You first run a sync in a Custom variant for which you set the Actions for all Categories to "Do nothing", except for the Category "Item exists on right side only", for which you set the action to "Delete right item".
This will delete all items to be deleted.
And then you run your normal Mirror sync on the same left-right pair(s).
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

The answer from 19 May 2015, 16:32 is still correct.
Posts: 1
Joined: 23 May 2019

marios_geo

I would like to bring this topic on. Is any update on this?
On the mirror option, files should be deleted first from the right and then copy the new one from the left.

The way I do it now, is to sync, ignore the not enough space on the right. Then files are deleted and sync again. A more elegant way, would be great. Maybe sort the actions first?
Posts: 3
Joined: 23 Jan 2020

teks.63c704

Just want to add to this request. I was suprised to see that you choose to handle this situation in this way. This sends me back to using rsync instead. Hope you implement delete before copy.
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

Just want to add to this request. I was suprised to see that you choose to handle this situation in this way. This sends me back to using rsync instead. Hope you implement delete before copy. teks.63c704, 23 Jan 2020, 08:13
viewtopic.php?t=1711&p=23064#p6944
Posts: 3
Joined: 23 Jan 2020

teks.63c704

OK thank you for the quick response. I disabled the recycle bin, but it still will not do the sync. I see your workarounds, I'm just making a comment on the expected default behaviour.
Posts: 3
Joined: 23 Jan 2020

teks.63c704

Human error. Disregard my posts. It is working as expected!