本帖最后由 pd1 于 2022-10-26 23:15 编辑
保持为1.bat,因为下面判断了不改自己- <# :
- @echo off
- powershell -NoProfile -ExecutionPolicy bypass "Get-Content -literal '%~f0' |Out-String|Invoke-Expression"
- pause
- #>
- ls -s|%{if($_.Name -ne "1.bat" -and $_ -is [System.IO.FileInfo]){$newname=$_.BaseName -creplace '(\S)','@$1';ren $_.FullName ($newname+$_.Extension)}}
复制代码
|