WHY 当前离线
上校
@echo off setlocal enabledelayedexpansion for /f "tokens=*" %%i in (config.ini) do ( set key=!key! "*%%i*" ) endlocal & set key=%key% for /f "delims=" %%i in ('dir /b /ad /s %key% ^| sort /r') do ( rd /s /q "%%i" ) del /s /a /f /q %key% pause复制代码
评分人数
TOP
aloha20200628 当前在线
上尉
@echo off & for /f "delims=" %%c in (config.ini) do ( for /f "delims=" %%F in ('dir /b/s/a-d "*%%c*" ') do del /f/q "%%F" for /f "delims=" %%D in ('dir /b/s/ad "*%%c*" ') do rd /s/q "%%D" ) 2>nul pause&exit/b复制代码
lovekix 当前离线
二级士官
ar-sa af-za am-et as-in az-latn-az arab~und-arab bg-bg bn-in bs-latn-ba ba-ru be-by bn-bd beng~und-beng复制代码
77七 当前离线
中校
del /s /a /f /q *af-ZA* *am-ET* *ar-SA* *bg-BG* *az-Latn-AZ*复制代码
@echo off & for /f "delims=" %%c in (config.ini) do ( for /f "delims=" %%i in ('dir /b /s /a-d "*%%c*" ') do del /a /f /q "%%i" ) pause&exit/b复制代码
回复 lovekix 可以。但其实 dir /b /s /a-d^|findstr /i "ar-sa" 还可以简化如下 dir /b /s / ... aloha20200628 发表于 2024-9-1 13:54
) do (for /f "delims=" %%i in ('dir /b /s /ad^|findstr /i %%c') do rd /s/q "%%i") pause&exit/b复制代码
@echo off for %%c in ( "af-ZA" "am-ET" ....... "zh-TW" ) do (for /f "delims=" %%i in ('dir /b /s /a-d^|findstr /i %%c') do del /a /f /q "%%i") pause&exit/b复制代码
for /f "delims=" %%i in ('dir /b /s /a-d^|findstr /i "ar-sa"') do del /a /f /q "%%i"复制代码
@echo off for %%c in ( "af-ZA" "am-ET" ..... "zh-TW" ) do (for /f "delims=" %%i in ('dir /b /s /a-d^|findstr /i %%c') do del /a /f /q "%%i") pause&exit/b复制代码