- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%i in ('dir /s /ar /b 路径\*.*') do (
- set "str=%%~ni"
- echo !str:~,4!|findstr /i "[^a-z]">nul&&set "no=a"
- echo !str:~-4!|findstr "[^0-9]">nul&&set "no=a"
- if not defined no echo %%i&set "no="
- )
- pause>nul
复制代码
|