on error resume next
code by netpatch
set arg=wscript.arguments
if arg.count=0 then wscript.quit
set fso = createobject("scripting.filesystemobject")
set conn = createobject("adodb.connection")
set rs = createobject("adodb.recordset")
path=left(arg(0),instrrev(arg(0),""))
fname=replace(arg(0),path,"")
i=0
conn.open "provider=microsoft.jet.oledb.4.0;data source="&path&";extended properties=""text;hdr=no;fmt=delimited"""
rs.open "select count(*) from " & fname,_
conn, 3, 3, &h0001
allline=rs(0)
rs.open "select * from " & fname,_
conn, 3, 3, &h0001
msgbox rs(0).name
do until rs.eof n/p
do until n=5000 要分割的行数
set mytables = fso.createtextfile(arg(0)&i&".txt",true)
mytables.writeline rs.fields.item(0).value
rs.movenext
n=n+1
loop
mytables.close
set mytables = nothing
n=0
i=i+1
loop
Rs.Close
Conn.Close
Set fso = Nothing
Set Rs = Nothing
Set Conn = Nothing
Wscript.echo "整理完毕!"











