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

Folder creation script 1

Status
Not open for further replies.

Trekk

Programmer
Aug 16, 2001
66
US
I have tried to create a script to create department folders based on a .csv file;that part works fine. I also need the script to create 3 folders under each department folder named full, read, and shared.

Any ideas on how to do this

Thanks

Here is the code

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile ("dept.csv", 1)

Do Until objTextFile.AtEndOfStream
NewFolder = "C:\" & objTextFile.ReadLine
objFSO.CreateFolder NewFolder
Loop
 
Do Until objTextFile.AtEndOfStream
NewFolder = "C:\" & objTextFile.ReadLine
objFSO.CreateFolder NewFolder
objFSO.CreateFolder NewFolder & "\full"
objFSO.CreateFolder NewFolder & "\read"
objFSO.CreateFolder NewFolder & "\shared"
Loop

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That was what I needed

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top