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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nt 4

Status
Not open for further replies.

luisito

Programmer
Apr 24, 2001
2
0
0
CR
automatics
folder creation based on machine name
 
You didn't specify where you want the folder... The script below will create a folder on the C: drive...

NewFolder.vbs
---------------------------
Code:
Set oFS = CreateObject("Scripting.FileSystemObject")
Set oNet = CreateObject("WScript.Network")
sys = oNet.ComputerName
If Not oFS.FolderExists("C:\" & sys) Then
   Set oFolders = oFS.Drives("C:").RootFolder.SubFolders
   oFolders.Add sys
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top