Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Files with script 2

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I want to create files with with vbscript or wscript.

I know about FileSystemObject but i want to know other alternatives.
 
Here is what u may be looking for:

Set oFSo = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")
Set oNet = CreateObject("Wscript.Network")

Cool?

laters
Aladdin420
 
thats great, thx

Wot is the rest of the code that goes with it...

Set oShell = CreateObject("WScript.Shell")


I want to add a line of code that creates a text file on my c:\ drive

This line of code does not work

set create=oShell.CreateTextFile("c:\script.txt")

Any ideas?
 
'*************************
Dim oFSo, File1

Set oFSo = CreateObject("Scripting.FileSystemObject")

Set File1 = oFSo.CreateTextFile("C:\script.txt")
'*********************************

This will create a text file called "script.txt" in your C drive. Okay?

Mark this thread if it was helpful bud.

Aladdin420
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top