- @Echo off&SetLocal EnableDelayedExpansion
- if not exist D:\文件夹3 md D:\文件夹3
- for /f "tokens=*" %%a in ('dir/a-d/b/oe')do set/a c+=1&set a!c!=%%a&set b!c!=%%~za&set c!c!=%%~xa
- for /l %%a in (1,1,%c%)do set/a d=%%a+1&for /l %%b in (!d!,1,%c%)do if not !b%%a!.==. call :1 %%a %%b
- goto :eof
- :1
- if !b%1!==!b%2! if !c%1!==!c%2! set b%2=&move "!a%2!" D:\文件夹3\
- goto :eof
复制代码
|