本帖最后由 lovekix 于 2024-9-3 10:29 编辑
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ar-SA"') do del /a /f /q "%%i"
复制代码
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ar-sa"') do del /a /f /q "%%i"
复制代码 第一问: 有必要 写两行吗?
第二问:如果 要是很多 怎么才能 减少运行时间- pushd C:
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "af-ZA"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "am-ET"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ar-SA"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "as-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "az-Latn-AZ"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "bg-BG"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "bn-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "bs-Latn-BA"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ca-Es-VALENCIA"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ca-ES"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "cs-CZ"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "cy-GB"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "da-DK"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "de-DE"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "el-GR"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "en-GB"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "en-AU"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "en-CA"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "en-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "en-GB"') do del /a /f /q "%%i"
-
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "es-ES"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "es-MX"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "et-EE"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "eu-ES"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "fa-IR"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "fi-FI"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "fil-PH"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "fr-CA"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "fr-FR"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ga-IE"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "gd-gb"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "gl-ES"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "gu-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "he-IL"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "hi-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "hr-HR"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "hu-HU"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "hy-AM"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "id-ID"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "is-IS"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "it-IT"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ja-JP"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ka-GE"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "kk-KZ"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "km-KH"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "kn-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ko-KR"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "kok-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "lb-LU"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "lo-LA"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "lt-LT"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "lv-LV"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "mi-NZ"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "mk-MK"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ml-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "mr-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ms-MY"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "mt-MT"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "nb-NO"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ne-NP"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "nl-NL"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "nn-NO"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "or-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "pa-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "pl-PL"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "pt-BR"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "pt-PT"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "quz-PE"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ro-RO"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ru-RU"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "sk-SK"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "sl-SI"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "sq-AL"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "sr-Cyrl-BA"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "sr-Cyrl-RS"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "sr-Latn-RS"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "sv-SE"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ta-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "te-IN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "th-TH"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "tr-TR"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "tt-RU"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ug-CN"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "uk-UA"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "ur-PK"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "uz-Latn-UZ"') do del /a /f /q "%%i"
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "vi-VN"') do del /a /f /q "%%i"
-
- for /f "delims=" %%i in ('dir /b /s /a-d^|findstr "zh-TW"') do del /a /f /q "%%i"
- 删除了小写的
- PAUSE
复制代码
|