- @echo off
- cd /d "%~dp0"
- powershell -c "$enc=new-object system.text.utf8encoding $false;$re=[regex]'(?i)a';$script:ctr=0;[system.io.file]::writealltext('a.txt',$re.Replace([system.io.file]::ReadAllText('a.txt',$enc),{param($m)$m.Value+(++$Script:ctr)}),$enc)"
- pause
复制代码
|