- @echo off&pause&goto :haijimaru
- $null=@'
- :haijimaru
- powershell "$l='%~dp0';type -literalpath '%~f0'|select -skip 1|out-string|iex"
- pause&exit/b
- '@
-
- if(!$l){$l=$pwd.path+'\'}
- [io.directory]::getfiles($l,'*.txt')|%{
- $s=[regex]::replace([io.file]::ReadAllText($_,[text.encoding]::UTF8),'\d\d*\.(第\d\d*章)','$1')
- [io.file]::WriteAllText("$l\__new_"+$_.split('\')[-1],$s,[text.encoding]::UTF8)
- }
复制代码
|