You do have to create each parent directory, before you can then create a
sub-directory under it.  if you're not sure which directories, if any, exist
in a long path sequence, you will have to do this for each possible
directory (test and create if not found).
 
Chip
 

  _____  

From: David [mailto:[email protected]] 
Sent: Friday, April 30, 2010 2:13 PM
To: Scripting List WE
Subject: Creating a new folder


I just wanted to confirm with you experienced scripters, this one.
 
If I have a subfolder called TEST, on my C: drive. I now want to create a
subfolder hereunder, let's call it SCRIPTS, and yet another subfolder under
this one, called VBS. I did try the following instructions, but it throws an
error on me, saying the path is not found.
 
Dim FSO: Set FSO = CreateObject( "Scripting.FileSystemObject" )
Dim Name
Name = "C:\test\Scripts\VBS"
FSO.CreateFolder( Name )
 
Is it so, that I do have to create each 'level' in this link, on its own?
I.E first create the SCRIPTS, then create the VBS subfolder. Or, Is there a
routine/instruction, that will do it for me?
 

  _____  

I am using the Free version of SPAMfighter <http://www.spamfighter.com/len>
.
We are a community of 7 million users fighting spam.
SPAMfighter has removed 1571 of my spam emails to date.
The Professional version does not have this message.

Reply via email to