Can someone give me the code for creating a file using VBScript? Thanks,
Spie
Printable View
Can someone give me the code for creating a file using VBScript? Thanks,
Spie
I think you can access FSO with VBScript
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim FSO, MyFile
Set FSO = CreateObject("Scripting.FileSystemObject")
Set MyFile = FSO.OpenTextFile(MyPath, ForWriting, True)
MyFile.Write sText
Set MyFile = FSO.OpenTextFile(MyPath, ForReading, True)
Dim FileData
Do Until MyFile.AtEndOfStream
FileData = FileData & MyFile.ReadLine & Chr(13)
Loop
Yeah, try the VB-Script forum! :)