![]() ![]() The second parameter is the iomode option. In this part: ("C:\test.txt" ,8, True), the first parameter is the path to the file. The CreateTextFile method creates a specified file name and returns a TextStream object that can be used to read from or write to the file. There are three options for the second parameter, 1 means for reading, 2 means for writing, and 8 means for appending. ![]() txt" ,8, True), the first parameter is the path to the file. How to create text file and write to it in vbscript, In this part: ("C:\test. 'Wscript.Echo objFile.Name 'Commented out ("Select * from CIM_DataFile Where Extension = 'mdb' OR Extension = 'ldb'") Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set objFile = objFSO.CreateTextFile(outFile,True) Set objFSO=CreateObject("Scripting.FileSystemObject") Anyway here is simplest one to give you kick start. Simple Google search like "vbscript create and write to text file" will give you ocean of information on how to tackle this. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |