- @echo off
- set info=互助互利,支付宝扫码头像,感谢赞助
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- set "rootpath=%~dp0"
- cd /d "%rootpath%"
- set "删除字符=来阁设计整理出品-"
- powershell -NoProfile -ExecutionPolicy bypass ^
- $list=@(dir -liter '%rootpath%' -r^|?{$_.Name -ne '%~nx0'}^|sort {$_.FullName.length} -des);^
- for($i=0;$i -lt $list.count;$i++){^
- $newname=$list[$i].Name.replace('%删除字符%','');^
- if($newname -ne $list[$i].Name){^
- $newpath=($list[$i].FullName -replace '[^^\\]+$','')+$newname;^
- write-host ($list[$i].FullName+' --^> '+$newname);^
- mv -liter $list[$i].FullName $newpath;^
- };^
- };
- echo;%info%
- pause
复制代码
|