mercuryljl 当前离线
列兵
lifei259 当前离线
二级士官
TOP
flashercs 当前离线
少校
@echo off setlocal EnableDelayedExpansion set "substr=-5" for /f "tokens=1 delims==" %%V in ('set #') do set "%%V=" for %%F in (*.*) do ( if /i not "%%F"=="%~nx0" ( set "fn=%%F" set "#!fn:~%substr%!=1" ) ) for /f "delims==" %%V in ('set #') do ( set "fn=%%V" set "fn=!fn:~1!" md "!fn!\" move "*!fn!" "!fn!\" ) endlocal pause exit /b复制代码
hlzj88 当前离线
@echo off echo. set vl= set /p vl=-----请输入你要归类的文件主要文件名----》 md %vl%&&move /y *%vl%*.* %vl%\ cls 需重复保留这行后面的代码 %0 直接退出保留这行后面的代码 exit复制代码
@echo off&setlocal EnableDelayedExpansion for /f "delims=" %%a in ('dir /a-d/b^|find /v "%~nx0"') do ( set name=%%~na set name=!name:~-5! echo,if not exist !name! md !name! echo, move "%%~sa" !name! ) pause复制代码