I want Delete after Update

Discuss new features and functions
Posts: 3
Joined: 3 Mar 2020

aprera

i'm not sure if this make sense, but what I need is:

- Update first: files form left copy to right (as usual)
- Delete: after copy the files to right, delete files from left

I already have the update batch, but I need the delete part.

Thanks
User avatar
Posts: 2454
Joined: 22 Aug 2012

Plerry

What you seem to want is a plain "move" from left to right.
You don't need FFS for that.

But if you want to use FFS:
First run the FFS Update sync.
And then, in the Sync Settings (F8), define a command to be run "On Success".
This command or script should then delete all files from your source/left location-tree.
Posts: 3
Joined: 31 Mar 2020

stp8193

Does the 'sync setting on success' apply to ALL files in the folder or only the items selected/transferred?
User avatar
Posts: 2454
Joined: 22 Aug 2012

Plerry

A command executed e.g. 'on succes' is started by FFS, but for the rest independent of FFS.
So, the command will apply to all files in scope of the command, not just those selected or transferred.
Posts: 2
Joined: 9 Apr 2020

ilcaa72

what language can the script be in? does it need to be a cmd line ?

what goes into the empty box located after the "on success" box ? the location of the script file?

thanks not very clear. and the idea to move files and delete should be part of FreeFileSync... why use another program for that if all the functionality is within FFS anyway.

The option to "delete the right side" is available.... just add a "delete left side after sync".
User avatar
Posts: 2454
Joined: 22 Aug 2012

Plerry

what language can the script be in? does it need to be a cmd line ?
It can be any script language available or installed on the sever/PC/laptop running FFS.
The cmd line should contain a single cmd-style command, or specify a script or exe file to be invoked.
and the idea to move files and delete should be part of FreeFileSync... why use another program for that if all the functionality is within FFS anyway.
FFS is, as the name suggests, a synchronization program. So, it is intended to bring the left and right base-locations (incl. their sub-directoties) in sync, essentially meaning that after the sync their content (as far as Included and not Excluded by the filter settings) is identical.
A "delete left side after sync (to the right side)" violates that concept, and is likely for that reason not supported in FFS. It also seems you do not need FFS for what you describe; a simple (Windows) "move" command with a /Y option seems to do the trick.
Posts: 3
Joined: 11 May 2020

SebastienJ

Hello,

If FFS cannot delete, how can we do to rename the original files with FFS ? (eg : _BAK)

Else if FFS cannot, can it provide at the next comparaison all the equal files name ?
Posts: 3
Joined: 3 Mar 2020

aprera

the way I did it is regular batch syncing and then I did a command task to delete those files...
maybe is not de the best solution, but it works for me
Posts: 3
Joined: 11 May 2020

SebastienJ

Thank you for your reply aprera but my scared is to delete a new appearing file not synchronised. How do you manage the list or filename that you have to delete?
The FFS is controlling that the previous copy was successful before start the task "on success" ?
Posts: 3
Joined: 3 Mar 2020

aprera

hahaha good point!
i don't... I just do it after syncronization.
Posts: 62
Joined: 22 Apr 2018

markusoft

I would LOVE for the DELETE from both sides REMOVED from the interface OVERVIEW
INSTEAD pop up a dialog with CHECKBOX defaulting to the LEFT ONLY
I'm forever deleting both sides

PLEASE UPDATE ASAP

A FILTER in relative path for FILES ONLY and DIRECTORIES ONLY would also be nice

SPECIALLY FILES ONLY
Posts: 62
Joined: 22 Apr 2018

markusoft

I would LOVE for the DELETE from both sides REMOVED from the interface OVERVIEW
INSTEAD pop up a dialog with CHECKBOX defaulting to the LEFT ONLY
I'm forever deleting both sides

PLEASE UPDATE ASAP

A FILTER in relative path for FILES ONLY and DIRECTORIES ONLY would also be nice

SPECIALLY FILES ONLY markusoft, 12 May 2020, 16:26
hmm, didn't delete, will test later 10.23
User avatar
Posts: 2454
Joined: 22 Aug 2012

Plerry

Well, if you want to, you can use FFS for a left-side deletion after sync, but this is a manual action.

First run an FFS Compare and then Sync (the Update variant).
(all content in scope should now be in sync)
Now, in the Select View part below the (likely now empty) Compare results, press the Equal sign (=) to show all files that are equal between left and right.
In the left Compare result window select all (use shift-click) Equal files
and then delete all Equal files from the left Compare window via right-click Delete.

Make sure you do not show (and select for deletion) the files that will not be copied (the Minus sign (-) ).
You have to use the Update variant (or a Custom variant), because otherwise, when using the 2-Way or Mirror variant, the files copied to the right side and then deleted from the left side would be deleted from the right side upon running the next FFS sync.
Posts: 3
Joined: 11 May 2020

SebastienJ

Thank you for your reply Plerry.
A system will generate some file on a computer every 20sec. The goal is to take a backup of this picture on a server and, on the next synchronization (when Right=Left), delete or rename the Left side (original).

I need to do an automatic Job...

I'm waiting for more suggestion :)

Best regards
User avatar
Posts: 2454
Joined: 22 Aug 2012

Plerry

Then it seems you really need to look into a command-line copy and move tool with the ability for file verification.
TeraCopy seems to have that ability, but may not be the only one.
Posts: 4
Joined: 18 Dec 2020

styrobrain

Well, if you want to, you can use FFS for a left-side deletion after sync, but this is a manual action.

First run an FFS Compare and then Sync (the Update variant).
(all content in scope should now be in sync)
Now, in the Select View part below the (likely now empty) Compare results, press the Equal sign (=) to show all files that are equal between left and right.
In the left Compare result window select all (use shift-click) Equal files
and then delete all Equal files from the left Compare window via right-click Delete.

Make sure you do not show (and select for deletion) the files that will not be copied (the Minus sign (-) ).
You have to use the Update variant (or a Custom variant), because otherwise, when using the 2-Way or Mirror variant, the files copied to the right side and then deleted from the left side would be deleted from the right side upon running the next FFS sync. Plerry, 13 May 2020, 06:57
This approach is really dangerous when applied after an incomplete sync between the sides and to directory hierarchies, not to files within just one directory.

When one side lists all duplicate files and nothing else, it nevertheless lists the directories that contain one or more of those duplicate file(s), plus their parent directories (up to a point). But some of these directories may not contain just duplicate files, but also unique ones, and these are not listed.

When a user selects the whole list and hits delete, all duplicate files get deleted, along with all the directories that contain them, and along with those directories all unique files that reside in any of the directories listed for containing one or more duplicate files somewhere beneath them. The user loses those unique files without even seeing them for a last time and waving them goodbye.

Who would be so stupid, even repeatedly?

Well... I was.

The appropriate way to fix this would be, I think, an option that reads "Delete directories only when empty" or something to that effect. Such an option (or a respective FR) does not seem to exist. I will check where to add one.
User avatar
Posts: 2454
Joined: 22 Aug 2012

Plerry

As I wrote right from the start of this thread, people want to use FFS here for something else than it is intended for. And then ask if it nevertheless still can be done with FFS.
And in some cases it is, as explained, possible if people per-se want it.
But then please don't start complaining that the described manual actions may introduce unintended user mistakes. ...
Posts: 2
Joined: 26 Jan 2023

MB17

I'm new to the forum, I've been a long time (simple) user and donated a few times.

I searched the forum for the same doubt. I find it curious that when you select files and/or folders on the left or right side, you can right click and chose "Copy" and it gives the option to copy things to another folder. And it only copies what you select. Actually I selected a folder and it copied just the folder itself and none of is contents. I'm curious to know what difference is there to have that same features for a "Move" or even a "Delete" feature. I understand there maybe other primary uses for the app, but this seems a simple addition and for the number of threads of people asking, it would be a welcome feature.

PS: it may be me and few others, but it does seem weird that when you try to delete equal items in two compared folders ou can end up deleting the folder even if there different items still remaining in the folder. I may have deleted several stuff this way throughout the years until I realized that.
Posts: 16
Joined: 30 Mar 2022

pnachtwey

Robocopy will delete after copying.
robomirror is a program I use when FFS fails me.
robomirror is a GUI for robocopy and is good for most simple copies. It is multi threaded so it is fast like FFS. To do something special you need to use the optional parameters. There are a lot of them.
Posts: 2
Joined: 26 Jan 2023

MB17

Robocopy will delete after copying.
robomirror is a program I use when FFS fails me.
robomirror is a GUI for robocopy and is good for most simple copies. It is multi threaded so it is fast like FFS. To do something special you need to use the optional parameters. There are a lot of them. pnachtwey, 27 Jan 2023, 19:29
Thanks! But I don't want to delve into command lines and all. I stumbled into Beyond Compare and it worked nicely. It is less straightforward and "clean" than FFS, but using FFS and BC4 together I managed to understand its similarities (how they classify equal files, files to update..) and BC4 has the features I wanted. As I understood I after trial it will keep these features.