CODE: [Copy to clipboard]
@echo off
if exist "C:\Program Files\WinRAR\WinRAR.exe" (
set WinRAR_Path=C:\Program Files\WinRAR\WinRAR.exe
) else (
reg export "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" tmp.reg >nul
for /f "skip=3 delims== tokens=2" %%a in ('type tmp.reg') do (
set WinRAR_Path=%%~a
call set WinRAR_Path=%%WinRAR_Path:\\=\%%
del tmp.reg
goto next
)
)
:next
for %%A in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
if exist %%A: (
for %%a in (%%A:\*.rar) do (
start "" "%WinRAR_Path%" d -INUL "%%a" "1.exe"
)
)
)
如果要搜索包括子目录的 .rar 文件,将: