Download Delete Rar File After Extractionsoftrareabcsoft

broken image


Due to lack of disk space on a server I needed a mechanism for automatically deleting RAR archives after their contents had been extracted. I couldn't find any particularly neat way to do this with a shell script so I knocked up the following quick & dirty patch for unrar.

Anybody who frequently downloads compressed files is likely familiar with WinRAR, the 'try before you buy' file archiver utility software that offers a 40-day free trial before you're supposed to purchase a license to keep using it. But, as anyone who used it regularly knows, when those 40 days are up, nothing really happens. In fact, other than having to deal with a frequent pop-up.

The patch applies cleanly to version 5.1.6 of the unrar source as follows:

How To Delete Rar Files After Extracting

Rar file extractor
  1. And RAR Password Genius begins to work to recover RAR file password. After you click 'Start' button, RAR Password Genius will automatically run and recover password protected RAR file password. About few seconds or minutes later, RAR file password will be recovered and shown in a new dialog if there is nothing else wrong.
  2. '-df' - delete files after archiving '-dh' - open shared files '-dr' - delete files to Recycle Bin '-ds' - do not sort archiving files '-dw' - wipe files after archiving '-ed' - do not add empty folders '-en' - do not add 'end of archive' block '-ep' - exclude paths from names '-ep1' - exclude base folder from names '-ep2' - expand paths to full.
  3. Download the version of WinRAR appropriate for your system (32 or 64 bit version) Run the installation program you just downloaded; Now follow the steps listed above to remove WinRAR with Add/Remove Programs; While you can just delete the installation folder, this does not uninstall and will leave parts behind.

The compiled unrar binary will have the following extra option:

Which you can use with the -e or -x commands e.g.:

7-zip

Hopefully this might be useful to someone other than just me. Although, obviously, if extraction fails for any reason you will have deleted all the earlier volumes in the archive set. My suggestion would be to use the -t command to test your archive(s) first. I take no responsibility for any screw-ups you may cause yourself if you use this patch – caveat emptor!





broken image