[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1. @echo off
  2. mode con lines=1000
  3. set info=互助互利,支付宝扫码头像,感谢赞助
  4. rem 有问题,可加QQ956535081及时沟通
  5. title %info%
  6. cd /d "%~dp0"
  7. powershell -NoProfile -ExecutionPolicy bypass ^
  8.     foreach($item in (dir^|?{$_ -is [System.IO.DirectoryInfo]})){^
  9.         $files=@(dir -liter $item.Name^|?{$_ -is [System.IO.FileInfo]});^
  10.         for($i=0;$i -lt $files.length;$i++){^
  11.             $newame=$item.Name+$files[$i].Extension;^
  12.             $newpath=$item.Name+'\'+$newame;^
  13.             $n=1;$f=$true;^
  14.             while(test-path -liter $newpath){^
  15.                 if($newame -eq $files[$i].Name){$f=$false;break;};^
  16.                 $newame=$item.Name+'_'+$n.toString()+$files[$i].Extension;^
  17.                 $newpath=$item.Name+'\'+$newame;^
  18.                 $n++;^
  19.             };^
  20.             if($f){^
  21.                 write-host ($item.Name+'\'+$files[$i].Name+' --^> '+$newpath);^
  22.                 mv -liter ($item.Name+'\'+$files[$i].Name) $newpath;^
  23.             };^
  24.         };^
  25.     };^
  26.     write-host '%info%' -ForegroundColor green;
  27. pause
复制代码
提供bat代写,为你省时省力省事,支付宝扫码头像支付
微信: unique2random

TOP

回复 13# qwop1209
没赞助没动力呀
提供bat代写,为你省时省力省事,支付宝扫码头像支付
微信: unique2random

TOP

回复 15# qwop1209
  1. @echo off
  2. mode con lines=1000
  3. set info=互助互利,支付宝扫码头像,感谢赞助
  4. rem 有问题,可加QQ956535081及时沟通
  5. title %info%
  6. cd /d "%~dp0"
  7. powershell -NoProfile -ExecutionPolicy bypass ^
  8.     foreach($item in (dir^|?{$_ -is [System.IO.DirectoryInfo]})){^
  9.         $files=@(dir -liter $item.Name *.jpg^|?{$_ -is [System.IO.FileInfo]});^
  10.         if($files.length -gt 0){^
  11.             write-host ($item.Name+'\'+$files[0].Name+' --^>  folder.jpg');^
  12.             cp -liter ($item.Name+'\'+$files[0].Name) ($item.Name+'\folder.jpg') -force;^
  13.         };^
  14.     };^
  15.     write-host '%info%' -ForegroundColor green;
  16. pause
复制代码
提供bat代写,为你省时省力省事,支付宝扫码头像支付
微信: unique2random

TOP

返回列表