本帖最后由 Blitz 于 2017-10-18 18:26 编辑
使用前先备份好自己的文件,以免造成损失- @echo off
- for /f "tokens=2,3 delims=-" %%a in ('dir *.doc /b') do echo %%a-%%b>>mulu
- for /f "delims=" %%i in (mulu) do if not defined %%i set %%i=A & echo %%i>>xmulu
- del mulu
- for /f "delims=" %%n in (xmulu) do md %%n
- del xmulu
- for /f "tokens=1-4 delims=-" %%f in ('dir *.doc /b') do move "%%f-%%g-%%h-%%i" "%%g-%%h"
- pause
复制代码
|