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

12,086

Solution 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.

Solution 2

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.

Share:
12,086

Related videos on Youtube

a_maar
Author by

a_maar

Full stack web developer using Microsoft .Net technologies. Over 8 years of web developing experience.

Updated on September 18, 2022

Comments

  • a_maar
    a_maar over 1 year

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

  • Egor   Skriptunoff
    Egor Skriptunoff about 7 years
    Wrong. This option DOES NOT affect command line rar invocations.
  • Karan
    Karan almost 7 years
    @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.
  • Abdulaziz AlShamrani
    Abdulaziz AlShamrani almost 7 years
    @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!!