- @echo off
- for /f "delims=" %%a in ('dir /a-d/b *.txt') do (
- set "fn=%%~na"
- set "f=%%a"
- setlocal enabledelayedexpansion
- if "!fn:~15!" neq "" (
- if "!fn:~16!" equ "" (
- for /f "delims=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" %%b in ("!fn!#") do (
- if "%%b" equ "#" (
- echo;"!f!"
- del /a /q /f "!f!"
- )
- )
- )
- )
- endlocal
- )
- pause
- exit
复制代码
|