1.读取指定文件夹中的文件中
Dim i \\个数
i = 0
set fso=CreateObject("Scripting.FileSystemObject")
set fs=fso.getfolder(".\A").files \\当前目录中的A文件夹中
for each f in fs
msgbox f
i=i+1
next
msgbox "文件总数:"&i
set fso = nothing
set fs = nothing
2.写TXT
set fs = createObject("Scripting.FilESyStEmObjeCt")
dim a,b
a="C:\A\1.txt"
set txt=fs.opentextfile(a,2)
txt.writeline ”hello world“
txt.close