- @echo off
- set info=互助互利,支付宝扫码头像,感谢赞助
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- cd /d "%~dp0"
- powershell -NoProfile -ExecutionPolicy bypass ^
- $files=@(dir -liter '%~dp0'^|?{('.txt' -eq $_.Extension) -and ($_ -is [System.IO.FileInfo])});^
- for($i=0;$i -lt $files.count;$i++){^
- $m=[regex]::match($files[$i].BaseName,'^^\D+(\d+)');^
- if($m.success){^
- [void](md $m.groups[1].value -force);^
- write-host ($files[$i].Name+' --^> '+$m.groups[1].value);^
- mv -liter $files[$i].FullName $m.groups[1].value -force;^
- };^
- };
- echo;%info%
- pause
复制代码
|