Delete Files In Origin Destination

Get help for specific problems
Posts: 1
Joined: 12 Mar 2016

alan.shenton

I have two folders.

I need to copy the contents on folder 1 to folder 2 (which I can do.)

I then want to delete to contents of folder 1. I can't figure out how to do this, or if it is even possible with FFS.

Has anybody successfully got this method working?

If so, could someone help please?

Thanks!
Posts: 30
Joined: 10 Feb 2013

drghughes

I don't think that it is possible with FreeFileSync.

The simplest solution is probably to just delete the files using the command line after FreeFileSync has run, or rather than use FreeFileSync, just move the files using the command line.
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

You can emulate a move by a copy followed by a delete. E.g. have two FFS runs, the first one copies, the second one deletes by having an empty source directory.
Posts: 10
Joined: 16 Dec 2016

Charlie

I would like to do this too.

I don't understand the advice to have two FFS runs with the second having an empty source directory though. Wouldn't this require manually deleting the contents to have the empty source? This is what I would like to automate.

It would seem simpler to just use the facility to run a command after synchronisation. I've tried using the 'del' command but it has no effect. Is this because it is necessary to set the full path for the folder? If so, this doesn't appear possible as the option to run a command after synchronisation isn't available in the local settings for each comparison pair.
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

"del" is for files. To recursively delete a folder use:
rd /s /q folder_path
Posts: 10
Joined: 16 Dec 2016

Charlie

Hi Zenju,

Thanks very much for your reply. That's right, I want to delete the files in a folder after they have been copied to the destination folder (and keep the origin folder).

So I guess this means it can't be done since the path can only be set in the global comparison settings, not the local comparison settings.