本帖最后由 for_flr 于 2022-5-19 11:26 编辑
批处理调用powershell来解,假设原txt名123.txt- #&cls&powershell "iex(gc '%~0'|out-string)"&pause&exit\b
- $array=[regex]::matches((gc 123.txt),'\d+\.' ).value
- $content=for($i=0;($i+10) -lt $array.count;$i++){
- $line=$array[$i..($i+10)] -join ','
- "unknownwindowse = {$line}; p[unknownwindowse]"
- }
- $content
- sc new_a.txt $content
复制代码
|