[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
回复 11# thp2008
  1. @echo off
  2. set "reg=[^a-z\d\u4e00-\u9fff.-]"
  3. REM 改文件名
  4. PowerShell "dir -Literal '%~dp0' -Recurse | ?{$_ -is [IO.FileInfo] -and $_.Name -match '%reg%'} | forEach{ $newName = $_.Name -replace '%reg%'; mv -Literal $_.FullName -Dest ($_.PSParentPath + '\' + $newName) -Force }"
  5. REM 改文件夹名
  6. PowerShell "dir -Literal '%~dp0' -Recurse | ?{$_ -is [IO.DirectoryInfo] -and $_.Name -match '%reg%'} | sort FullName -Desc | forEach{ $newName = $_.Name -replace '%reg%'; mv -Literal $_.FullName -Dest ($_.PSParentPath + '\' + $newName) -Force }"
  7. pause
复制代码
2

评分人数

TOP

返回列表