|
本帖最后由 fuldho 于 2014-5-27 07:50 编辑
#include <Array.au3>
$Str="(FOLDER) C:\Program Files\Common Files\Thunder Network\ServicePlatform" & @CRLF & _
"(*)(FILE) stat.xml" & @CRLF & _
"2014/5/23 17:13, 8 bytes, A ==> 2014/5/23 17:14, 8 bytes, A" & @CRLF & _
"(FOLDER) C:\Program Files\TAP-Windows" & @CRLF & _
"(*)(FILE) Uninstall.exe" & @CRLF & _
"2014/5/23 17:12, 83823 bytes, A ==> 2014/5/23 17:14, 83823 bytes, A" & @CRLF & _
"(FOLDER) C:\Users\Administrator\AppData\Roaming\Tencent\Logs" & @CRLF & _
"(*)(FILE) QQ.tlg" & @CRLF & _
"2014/5/23 16:58, 11309816 bytes, A ==> 2014/5/23 17:13, 11619124 bytes, A" & @CRLF & _
"(FOLDER) C:\Windows\inf" & @CRLF & _
"(+)(FILE) oem9.inf = 2014/5/23 17:14, 7271 bytes, A" & @CRLF & _
"(+)(FILE) oem9.PNF = 2014/5/23 17:14, 8304 bytes, A" & @CRLF & _
"(*)(FILE) setupapi.dev.log" & @CRLF & _
" 2014/5/23 17:12, 2839343 bytes, A ==> 2014/5/23 17:14, 2917412 bytes, A" & @CRLF & _
"(*)(FILE) setupapi.ev1" & @CRLF & _
" 2014/5/23 17:12, 6240 bytes, A ==> 2014/5/23 17:14, 6296 bytes, A" & @CRLF & _
"(*)(FILE) setupapi.ev2" & @CRLF & _
" 2014/1/4 15:36, 7416 bytes, A ==> 2014/5/23 17:14, 7448 bytes, A" & @CRLF & _
"(*)(FILE) setupapi.ev3" & @CRLF & _
"2014/5/23 17:12, 86016 bytes, A ==> 2014/5/23 17:14, 86016 bytes, A" & @CRLF & _
"(FOLDER) C:\Windows\System32\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}" & @CRLF & _
"(+)(FILE) oem9.CAT = 2013/8/22 20:40, 10476 bytes, S" & @CRLF & _
"(FOLDER) C:\Windows\System32\drivers" & @CRLF & _
" (+)(FILE) tap0901.sys = 2013/8/22 20:40, 35288 bytes, A" & @CRLF & _
"(FOLDER) C:\Windows\System32\DriverStore" & @CRLF & _
" (*)(FILE) INFCACHE.1" & @CRLF & _
" 2014/1/4 15:36, 1539176 bytes, A ==> 2014/5/23 17:14, 1539288 bytes, A" & @CRLF & _
" (*)(FILE) infpub.dat" & @CRLF & _
" 2014/1/4 15:36, 86016 bytes, A ==> 2014/5/23 17:14, 86016 bytes, A" & @CRLF & _
" (*)(FILE) infstor.dat" & @CRLF & _
" 2014/1/4 15:36, 143360 bytes, A ==> 2014/5/23 17:14, 143360 bytes, A" & @CRLF & _
" (*)(FILE) infstrng.dat" & @CRLF & _
" 2014/1/4 15:36, 143360 bytes, A ==> 2014/5/23 17:14, 143360 bytes, A" & @CRLF & _
"(+)(FOLDER) C:\Windows\System32\DriverStore\FileRepository\oemwin2k.inf_x86_neutral_4a65d8f20107343c" & @CRLF & _
" (+)(FILE) oemwin2k.inf = 2013/8/22 19:38, 7271 bytes, A" & @CRLF & _
" (+)(FILE) oemwin2k.PNF = 2014/5/23 17:14, 8304 bytes, A" & @CRLF & _
" (+)(FILE) tap0901.cat = 2013/8/22 20:40, 10476 bytes, A" & @CRLF & _
" (+)(FILE) tap0901.sys = 2013/8/22 20:40, 35288 bytes, A"
$nstr1 = StringRegExp($str, "\(FOLDER\)(.*?)\r", 3)
_ArrayDisplay($nstr1)
$nstr2 = StringRegExp($str, "\(FILE\)(.*?)=", 3)
_ArrayDisplay($nstr2)
把每个文件夹FOLDER下的文件匹配到该文件夹下
如第一个FOLDER
C:\Program Files\Common Files\Thunder Network\ServicePlatform\stat.xml
或
C:\Program Files\Common Files\Thunder Network\ServicePlatform
stat.xml
最后一个FOLDER
C:\Windows\System32\DriverStore\FileRepository\oemwin2k.inf_x86_neutral_4a65d8f20107343c\oemwin2k.inf
C:\Windows\System32\DriverStore\FileRepository\oemwin2k.inf_x86_neutral_4a65d8f20107343c\oemwin2k.PNF
....
先谢谢了 |
|