Custom "extract" button

Hello!

I would like to create a custom extract button. I have a 2 pane window - the left window contains zip files I download - the right contains a folder that i unzip the contents of the zip files into.

What I would like the function to do is the following:

  1. Select zip file or files on the left pane
  2. Click custom extract button

What I would like to happen is the following:

  1. Delete the FOLDERS in the right pane that are contianined in the incoming zip files selected on the left pane
  2. Extract the zip files into the right pane

The more I think of this the more I think it is not doable - how would DoPus know what all the filenames are in the incoming zip files?

The root of the problem is this - if I simply "overwrite" the files there may be artifacts in the right pane that should no longer be there - I may end up with extra files. FOr Example:

Zip file Contents

file1.zip
Folder1
|-File1
|-File2

Right pane contents
Folder1
|-File1
|-File2
|-File3

As you can see overwriting the zip file contents into the right pane leaves File3 there, which should no longer be there.

Any ideas?

If I understand you correctly, you wish to synchronize the right pane so it is the same as what is in the zip file? If so, you should be able to do with on the synchronize tab of the utility panel. Open your zip in the left pane, the folder to zip to in the right, and set the synchronize panel up like the screenshot below. Just make sure the zip file contents are the source.


John's suggestion of using the sync tool seems like the way to go.

Another thing that you may find useful here (or in general) is this command:

Select SOURCETODEST

If you select some things in one side of the lister and click that button it will select all the same items in the other side. It's very useful when you want to delete files that exist in another location as well as when you want to quickly see which files are in both locations.

Nice command, so I thought it would be great if I could clear the previous selection in the destination listed before running SOURCETODEST. So after selecting some files and folders in the source listed why doesn’t this work?

Set STATE=Dest
Select NONE
Set STATE=Dest
Select SOURCETODEST

Using the Set STATE=Dest trick to change the lister/pane that's being acted on often requires that you use dopusrt to run the commands. Otherwise I think the command still runs in the context of the original pane. (Although I'm not sure about that. Sometimes it does seem to work as expected.)

Anyway, it's not worth worrying about here because you can do what you want with a single-line command:

Select SOURCETODEST DESELECTNOMATCH

Perfect… thanks nudel. Dopus Rocks! It’s like a never ending learning fest.

Goldy