既然是数据库,可以直接用数据库的方法,何必舍近求远?- @set @n=0//&cscript.exe -e:jscript "%~f0"&exit /b
-
- file = "users.txt";
-
- AdoCnn = new ActiveXObject("ADODB.Connection");
- AdoCnn.Open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.;Extended Properties="text;HDR=no;FMT=Delimited;";');
- AdoCnn.Execute("SELECT DISTINCT Mid(F1,InStr(F1,'UserID=')+7,Instr(F1,'&PassWord=')-InStr(F1,'UserID=')-7) as [UserID], Mid(F1,Instr(F1,'&PassWord=')+10,32) as [PassWord] INTO [result.txt] from ["+file+"] WHERE F1 LIKE '%UserID=%&PassWord=%'");
- AdoCnn.Close();
复制代码
|