- @echo off
- set info=标题
- title %info%
- set "fd=C:\Windows\servicing\Packages"
- if not exist "%fd%" (echo;"%fd%" no found&goto end)
- for /f "delims=" %%a in ('dir /a-d/b/s "%fd%\"') do (
- if "%%~nxa" neq "%~nx0" (
- set "name=%%~na"&set "f=%%a"&set "z="
- setlocal enabledelayedexpansion
- if /i "!name:Microsoft-Windows-Presentation-Package=!" neq "!name!" set z=1
- if /i "!name:Microsoft-Windows-WindowsFoundation-LanguagePack-Package=!" neq "!name!" set z=1
- if not defined z del /f /q "!f!"
- endlocal
- )
- )
- :end
- echo;%info%
- pause
- exit
复制代码 感谢 zaqmlp |