Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set rarpath=C:\Program Files\WinRAR\rar.exe
- set sha1path=C:\sha1sum.exe
- set Szippath=C:\Program Files\7-Zip\7z.exe
- ::Place this batch file in the same folder as your .rar files
- ::Files will be extracted into this same folder
- ::Sha1 will be created
- ::All rars and the sfv will be deleted
- :EXTRACT WINRAR
- if exist *.rar (
- "%rarpath%" e *.rar
- ) else (
- for %%d in ("%cd%") do echo No .rar files were found in "%%~nd".
- )
- :CREATE .SHA1
- if exist *.mkv (
- "%sha1path%" sha1sum *.mkv > checksums.sha1
- ) else (
- for %%d in ("%cd%") do echo No .mkv files were found in "%%~nd".
- )
- :DELETE .MKV
- if exist *.mkv (
- DEL *.mkv
- ) else (
- for %%d in ("%cd%") do echo No .mkv files were found in "%%~nd".
- )
- :EXTRACT 7ZIP
- if exist *.rar (
- "%Szippath%" e *.rar
- ) else (
- for %%d in ("%cd%") do echo No .rar files were found in "%%~nd".
- )
- :CHECK .SHA1
- if exist *.sha1 (
- rundll32 %WinDir%\System32\ShellExt\HashCheck.dll HashVerify_RunDLL checksums.sha1
- ) else (
- for %%d in ("%cd%") do echo No .sha1 files were found in "%%~nd".
- )
- :CLEAN UP RARS
- if exist *.r* (
- DEL *.r*
- ) else (
- for %%d in ("%cd%") do echo No rars to delete in "%%~nd".
- )
- :CLEAN UP SFV
- if exist *.sfv (
- DEL *.sfv
- ) else (
- for %%d in ("%cd%") do echo No .sfv to delete in "%%~nd".
- )
- echo DONE :)
- pause > nul
Advertisement
Add Comment
Please, Sign In to add comment