Search found 2 matches

by redbob1985
11 May 2020 02:21
Forum: DOS Batch Forum
Topic: Unzip or Unrar files with Batch file?
Replies: 21
Views: 14706

Re: Unzip or Unrar files with Batch file?

command1&&command2 only runs command2 if command1 is successful, so you can say for %%A in (*.rar) do ( "%rarpath%" x "%%~A" && del "%%~A" ) This works perfectly, such a small script and does just what I need. Thank you so, so much for sharing this and helping me! I greatly appreciate it!
by redbob1985
10 May 2020 04:36
Forum: DOS Batch Forum
Topic: Unzip or Unrar files with Batch file?
Replies: 21
Views: 14706

Re: Unzip or Unrar files with Batch file?

ivar75, This is tested. It works with WinRAR command line application for *.rar files and 7-Zip command line application for *.7z and *.zip files. @echo off setlocal EnableDelayedExpansion set rarpath= set 7zpath= ::If it is a .rar file that you want to unrar, set ¦rarpath¦ to rar.exe ::rar.exe can...