Compare and delete?

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.

Vic, you should ask Beyond Compare questions on the Scooter Software forums.
Regards, AB[/quote]

Ok, I'll ask on BC questions on the BC forums.

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

I did try but I must be doing something wrong because it's not working for me.

Vic,
give that solution a try:

  1. Download freeware version of xxcopy
    http://xxcopy.com/download/xxfw3112.zip

  2. Unzip the archive and open a command-line in the appropriate subdir (32/64 bit)

  3. Install xxcopy to your system by calling:
    xxcopy.exe /install

  4. Start the removal command to find out if that is what you asked for:

xxcopysu.exe [i]{sourcepath$} {destpath$}[/i] /BS /RD /E /H /YY /PB

Example:

xxcopysu.exe D:\Source\ D:\Target\ /BS /RD /E /H /YY /PB

Vic

I use a couple of 3-button buttons with the LMB invoking Opus built-in Sync and the RMB invoking Beyond Compare. The first button operates on the current top level folder which can, of course, be the root folder of a drive - e.g. C:. The second button operates on a selected folder.


LMB1 code:

@nodeselect Go "{sourcepath$}" DUALPATH "{dlgstring|Type a drive letter..|E}:\{sourcepath$|noroot}" LAYOUT=SyncLock

RMB1 code:

@nodeselect @nofilenamequoting @set dir={alias|homeroot}\utilities\BC3\ @set app=Bcompare.exe cd {$dir} {$dir}{$app} "{sourcepath$}" "{dlgstring|Type a drive letter..|E}:\{sourcepath$|noroot}"

LMB2 code:

@dirsonly @nodeselect Go "{filepath$}" DUALPATH "{dlgstring|Type a drive letter..|E}:\{filepath$|noroot}" LAYOUT=SyncLock

RMB2 code:
@dirsonly
@nodeselect
@nofilenamequoting
@set dir={alias|homeroot}\utilities\BC3
@set app=Bcompare.exe
cd {$dir}
{$dir}{$app} "{filepath$}" "{dlgstring|Type a drive letter..|E}:{filepath$|noroot}"[/code]

I use Beyond Compare portable. You will need to change the @set dir= definitions above to point to where your Bcompare.exe is located.
For the internal commands, I use a saved layout called "SyncLock" to activate the synchronise utility panel and force navigation lock on.
My default target drive is E: simply because that is where I keep my local backups. The commands allow overriding the default.

Regards, AB