返回列表 发帖
本帖最后由 wanghan519 于 2024-1-31 08:34 编辑
  1. #@&cls&powershell "type '%~0'|out-string|iex"&pause&exit
  2. dir *.pdf | group {$_.Name -replace '_.*$'} | %{$m=0;$_.Group | sort {$_.Name.Length} -Descending | %{$a=$_.Name -split '[_.]';if($a[-2].Length -gt $m){$m=$a[-2].Length};rni $_.Name ($_.Name -replace '_(\d+)\.',"_$($a[-2].PadLeft($m,'0')).")}}
复制代码
写的比较啰嗦,凑活能用,回头再改

TOP

返回列表