回复 10# 小白来了
- @echo off
- rem 批处理保存为ansi编码格式
- cd /d "%~dp0"
- rem 复制数字开头
- for /f "tokens=1* delims=-" %%a in ('dir /b /a-d ^|findstr /rbc:"[0-9][0-9]*-"') do (
- for /f "delims=" %%c in ("%%b") do (
- for /d %%d in ("d:\*%%~nb*") do (
- copy "%%a-%%b" "%%d"
- )
- )
- )
- rem 复制非数字开头
- for /f "delims=" %%a in ('dir /b /a-d ^|findstr /rbvc:"[0-9][0-9]*-"') do (
- for /d %%d in ("d:\*%%~na*") do (
- copy "%%a" "%%d"
- )
- )
- pause
复制代码
|