[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1. #@&cls&powershell "type %~s0|out-string|iex"&exit
  2. $a=gc -readcount 0 D:\UTF16.txt
  3. $b=(($a[-1..-500] -match '企业 ')[0] -split ' ')[6]
  4. $f=0
  5. sc D:\out.txt $(foreach($i in $a){if(($f -eq 0) -and $i -match "简名:\S+\s$b"){$i;$f=1}elseif(($f -eq 1) -and $i -match '已执行'){$f=0;$i,''}elseif($f -eq 1){$i}})
复制代码

TOP

回复 3# 娜美


    测过了没有多

TOP

回复 5# 娜美


测过了是对的
你仔细看看2楼的和你现在用的有什么不同

TOP

回复 7# 娜美


顺便把代码文件也发一下

TOP

呃可以不猜吗,发一下这个200mb的文件

TOP

  1. 简名:\S+\s$([regex]::escape($b))
复制代码

TOP

回复 13# 娜美
  1. #@&cls&powershell "type %~s0|out-string|iex"&exit
  2. $a=gc -readcount 0 D:\UTF16.txt
  3. $b=(($a[-1..-500] -match '企业 ')[0] -split ' ')[6]
  4. $f=0
  5. sc D:\out.txt $(foreach($i in $a){if(($f -eq 0) -and $i -match "简名:\S+\s$([regex]::escape($b))"){$i;$f=1}elseif(($f -eq 1) -and $i -match '已执行'){$f=0;$i,''}elseif($f -eq 1){$i}})
复制代码

TOP

返回列表