Extract and delete

Hope I didn't overseen somethin in forum search :slight_smile:

I like to create a button which deletes archives (zip/rar) automatically after SUCCESSFULLY extracting with drag'n'drop (or even with deletion confirm). Is this possible?

Following seems to work:

@set ChildPath={sourcepath$|noterm}
@runmode hide
Copy MOVE * TO ..
Go ..
@keydown:shift
@keydown:none
rmdir {$ChildPath}

note: this is a DOS type button

from: Moving files around via context menus

hmm, no. This doesn´t really work with zips. Sorry.

With Winrar I can get the deletion confirmation. So I don't even need a button for it.

Hope I didn't overseen somethin in forum search :slight_smile:

I like to create a button which deletes archives (zip/rar) automatically after SUCCESSFULLY extracting with drag'n'drop (or even with deletion confirm). Is this possible?

Is the problem just that you've turned off delete confirmations but want the confirmations on just for that particular action?

I often extract withd d'n'd (only one archive with several parts). I don't know if it's possible to autocheck if extraction is succesful (also after aborting), so a delete-confirmation would be good enough.

Main problem to me is how to select the archiv and also all parts of it.

What do you use to extract?

Internal zip/rar of DO. Sometimes WinRAR if I need more options.

This simple command seems to do what you want:

Copy EXTRACT
Delete

(Assuming delete confirmations are enabled.)

Ugh, that easy? Will try at home...

Ahh, that was too easy :slight_smile:! This just deletes only the first part of an archive. I like to delete ALL parts (if exists).

After extracting DO should select automatically all other parts, too.

The command should remember the first part and - if exists - select all other parts by just ignoring the extension.

Do what I do. I use Winrar and it automatically deletes all files. There would be no difference for the user in using the builtin or winrar.

You should be able to use something like Delete {filepath|noext}.* (maybe with some quotes and @nofilenamequoting added), but I've been having problems getting that to work (which I think are due to the beta version I'm using; I haven't investigated yet).

I know that WinRAR is able to do that, if I would find this setting again :frowning:! I remember that some options are only available when extracting/compressing (like keep fils even if there're broken).

On the other side it would be nice to have it in DO for those, who don't have WinRAR or similar. Or when using USB-version on other pc's where WinRAR isn't installed.

This works:

@nofilenamequoting
Copy EXTRACT
Delete "{filepath|noext}.*"

Obviously, it will delete other files with the same base name if they exist but there's not a lot you can do about that.

It'll also only work with the classic-style multi-volume RAR naming scheme (.rar, .r01, .r02, etc.), not the new one (.part1.rar, .part2.rar, .part3.rar, etc.). You'd probably have to feed the filepath to a script if you wanted to handle the newer one.

As if multi-volume archives weren't enough of a pain already. :slight_smile: Why do people still use them in this age of huge disks and file-transfer protocols that inherently deal with large files? :slight_smile:

I will configure WinRAR to do this job. However thanks Leo.

Off-Topic: Multi-Archives make sense when down-/uploading. But only then! On error you don't need to dl/ul the whole file again. But I never compress files for archiving, I always create an ISO for collections with a large amount of files.