批量解压子文件夹中的压缩包
@echo off
::设置WinRAR软件的路径
set "rarpath=C:\Program Files\WinRAR\WinRAR.exe"
if not exist "%rarpath%" (echo;WinRAR指定的zhi路径不正确或没有安dao装软件&pause&exit)
for /f "delims=" %%a in ('dir /a-d /s /b *.zip') do (
"%rarpath%" e -y "%%a" "%%~dpa"
)
for /f "delims=" %%a in ('dir /a-d /s /b *.rar') do (
"%rarpath%" e -y "%%a" "%%~dpa"
)
pause
批量删除子文件夹下的指定后缀名文件
@echo off
cd /d %~dp0
echo clearing......
del /f /s /q *.rar
del /f /s /q *.bmp
del /f /s /q *.gif
echo clean complete!
echo. & pause