Compare and delete?

Hi,

I'm new here.

I was wondering if it would be possible to do the following with Dopus:

I'd like to copy a folder (with files, folders and subfolders in it) from one drive

to another. Then I'd like dir opus to look for the files that I copied over to the

destination drive (that are also present in the source lister), locate them and

delete them.

I played around with the synchronize feature and ran a search her eon the forums but

I'm not any wiser. :frowning:

Any help appreciated.

Vic

Perhaps you could use duplicate finder tool (part of Dopus, ctrl+U) to achieve this?

So you want to copy some files from A to B, then delete them from B?

Presumably something else happens in between (or there'd be no point copying them), and there are lots of other files you want to keep mixed in with the same destination (sub-)folders on B?

Hi,

Actually what i was trying to do is this. I want to install/copy an aeroplane for my flightsim from the original directory say dir c:\origdirplane to d:/flightsim. In the future if I don't like it I'd have to remove the files I copied so I'd go to my original directory and compare the files I installed into d:flightsim and remove them with diropus ?

Is it possible ?

Thanks
Vic

Anything wrong with holding down the Shift key when you drag-n-drop to Move files (i.e. Copy and then Delete original)? Or do you not trust that operation?

I think the idea is like a reverse sync... So the source is left alone, but anything in the destination that is also in the source gets deleted (recursively).

There are a few ways you could do this, but maybe it's not needed: Do you try out the new plane in the flightsim straight away, and then decide if you want to keep it or not? If so, and if you don't shutdown Opus or reboot between the two things, then you can probably use the Undo List in Opus to undo the file copy and delete anything that was copied across. (The only thing it won't undo is restore the original versions of files which were replaced by other files.)

Leo,

Correct.

Would mind telling me how to accomplish this ?

Yes of course I test the plane. sometime not straight away and sometimes after a reboot. The idea is also to use the same "strategy when I install sceneries and other stuff.

Thanks ! :slight_smile:

This seems better handled by making an archive snapshot of the destination (sim) directory, and restoring that snapshot after testing out your additions.

Or use something like rsync.

MrC,

you taking a snapshot/image with imaging software right ? If yes I know but I was looking to see if i could do things with dopus.I have the feeling it can be done as leo suggested but I need him to tell me how :slight_smile:

You wouldn't need to use imaging software if it's something which can be undone by simply deleting some files. Just copy the directory to somewhere else, then when you're done sync it back with the option turned on to delete files from the destination that are not in the source. (Assuming there are no unusual file permissions or alternate-data-streams on the files in that folder. If there are then they might be lost in the process.)

But I'm assuming you wouldn't want to do that because it would involve copying a lot of extra data, given the size of games/sims these days.

The solutions I had in mind are a bit klunky but would work. For example, it'd be fairly easy to write a small vbscript which takes the two directories and then goes through the source directory making a list of everything in it, while deleting those things from the destination directory. Or, if you wanted to check what was going to be deleted before going ahead, the vbscript could generate a .bat file which would delete the files when run and which could be viewed first in a text editor. (Assuming none of the filenames have non-ascii characters which would cause problems in a .bat file. If they do then it could make a list of files that a second vbscript could delete.)

If it was me personally, I'd launch Beyond Compare (or a similar tool) from Opus and click its button which shows only files which are in both the left and right sides, then delete the ones on the right.

[quote="leo"]

If it was me personally, I'd launch Beyond Compare (or a similar tool) from Opus and click its button which shows only files which are in both the left and right sides, then delete the ones on the right.[/quote]

Hi,

I donloaded beyond compare and it looks a bit confusing to me.How would I launch the software from OPUS ? Would you mind giving me some fool-proof instructions ? Thanks :slight_smile:

Commands for running Beyond Compare from Opus are here:

(Do you need help with turning the commands into buttons?)

If you use the one from my reply, go to the two directories (one in each side of the Opus window) and click the button to compare them.

In Beyond Compare, there's a button on the toolbar which tells it to only show you files which are the same in both folders:

You can easily do that by adding a DOpus command that starts xxcopy.exe (free for private usage):

The following command recursively (!) removes all files from the destination directory that exist in the source directory and look identical (file/size). In other words you can rollback a copy operation that was done from source to destination without any conflicts occurred.

xxcopysu.exe {sourcepath$} {destpath$} /BS /RD /E /H

xxcopy.com/xcpydnld.htm

If you want to run the command unattended you can add the "super-yes-parameter" /YY.

But this will delete files and folders without any user attention (good for batch scripts).

If you don't like the command line window you can use the following:

@runmode:hide
xxcopysu.exe {sourcepath$} {destpath$} /BS /RD /E /H /YY /PB

This will hide the command line window and shows a progress dialog instead.

Leo,

(Do you need help with turning the commands into buttons?)

If you use the one from my reply, go to the two directories (one in each side of the Opus window) and click the button to compare them.

Yes please.

Select Settings -> Customize Toolbars, right-click where you want the new button, choose Insert New -> New Button (or New -> New Button depending on exactly what was right-clicked).

A new button will appear; right-click it and choose Edit.

Click Advanced to expand the editor, so that you can enter a multi-line command.

Paste the command into the big box in the button editor, and give it whichever name and hotkey you want.

Click OK in the button editor, and OK in the Customize window to save the changes and return to normal.

Hi Leo,

Thanks for your instructions. I made it :slight_smile: I'd have another question: Beyond compare does not seem to always search subfolders. Sometimes files appear and then disappear right away tooo.is there also a way to let it compare the entire hard drive ?

Thanks

Vic, you should ask Beyond Compare questions on the Scooter Software forums.

Re your specific question, BC3 can certainly compare two disk structures - e.g. C:\ and D:.

Regards, AB

When comparing folders, BC initially shows everything below the initial folder, including files it has not yet compared, and then updates the list as it goes along, potentially hiding files it was initially showing if the comparison result means they should not be visible according to the mode you have BC in.