How to extract and erase the original compressed file on Windows 7?

2

Given a compressed file, how can I extract the file contents and erase the original compressed file?

a_maar

Posted 2012-11-26T10:03:24.410

Reputation: 209

Answers

1

On Mac OSX this is already the case.

Meanwhile this post suggests that WinRAR has this feature, and that it is reasonably easy to script this for 7-zip.

Karthik T

Posted 2012-11-26T10:03:24.410

Reputation: 2 654

4

WinRAR

1

Delete archive

Never: Do not delete an unpacked archive.

Ask for confirmation: Ask for user confirmation before deleting an unpacked archive.

Always: Delete an unpacked archive without a confirmation.

WinRAR deletes an archive only if it had been unpacked without errors and if all archived files were selected to unpack. If you unpack a multivolume archive, all its volumes will be deleted.

Note that you can save the default state of this option with "Save settings" button in General page of extraction dialog and it will also affect command line and context menu extraction commands. Use "Ask for confirmation" and especially "Always" mode with care. Deleting an unpacked archive can cause data loss if used improperly.

Karan

Posted 2012-11-26T10:03:24.410

Reputation: 51 857

Wrong. This option DOES NOT affect command line rar invocations. – Egor Skriptunoff – 2017-02-08T14:50:40.690

@EgorSkriptunoff: Did you try invoking winrar.exe from the command-line? Probably when the Help file states that "it will also affect command line and context menu extraction commands", they are referring to the use of winrar.exe which obeys the defaults you've set via the GUI. – Karan – 2017-05-16T03:14:23.673

1@EgorSkriptunoff rar.exe is the command line tool and the change in the settings will not affect it. instead you can use winrar.exe from command line as well and it will use the saved settings!! – Abdulaziz AlShamrani – 2017-06-16T12:52:54.333