itunesis 当前离线
上等兵
TOP
went 当前离线
少校
@echo off powershell -version 2.0 -c "dir | Where-Object {$_.Attributes.ToString() -eq 'Directory'} | foreach { if ($_.Name -match '\d\.\d'){ Rename-Item $_.FullName ($_.Name -replace ('(?<=\d)\.(?=\d)','-'))}}" pause&exit复制代码
@echo off powershell -version 2.0 -c "dir -Recurse | Where-Object {$_.Attributes.ToString() -eq 'Directory'} | Sort-Object {$_.FullName.Split('\').Count} -Descending | foreach {if ($_.Name -match '\d\.\d'){Rename-Item $_.FullName ($_.Name -replace ('(?<=\d)\.(?=\d)','-'))}}" pause&exit复制代码