- @echo off&SetLocal EnableDelayedExpansion
- ::for /f "delims=" %%i in ('dir /b /a /s *') do (attrib "%%i" +h)>nul
- ::压缩
- for /f "delims=" %%i in ('dir /b /adh %cd%\*') do (for /f "delims=" %%j in ('dir /b /adh %cd%\*') do (
- if "%%~nxi" neq "preview" (if "%%~nxi" neq "wallpaper" (if "%%~nxi" neq "description.xml" ("C:\Program Files\7-Zip\7z.exe" a "%%~dpi%%i.zip" "%%j\*">nul
- echo %%j压入%%~dpi%%i.zip
- )))))
- echo ________________________________________________________________________
- for /d %%i in ("%cd%\*") do (for /d %%j in ("%%i\*") do echo %%j压入%%i.zip)
- pause
复制代码 不太理想 |