FileSystemObject.CreateFolder Method (VB6) |
Yes
oFileSysObj.CreateFolder(Path)
oFileSysObj
Use: Required
Data Type: FileSystemObject object
Any object variable returning a FileSystemObject object.
Path
Use: Required
Data Type: String
An expression that returns the name of the new folder to create.
A Folder object
Creates a single new folder in the path specified and returns its Folder object.
Wildcard characters aren't allowed in newfoldername.
Path can be a relative or absolute path.
If no path is specified in Path, the current drive and directory are used.
If the Path path is read-only, the CreateFolder method fails.
If Path already exists, the method generates runtime error 58, "File already exists."
If the user has adequate rights, Path can be a network path or share name. For example:
CreateFolder "\NTSERV1d$RootTwo ewFolder" CreateFolder "\NTSERV1RootTest ewFolder"
You must use the Set statement to assign the Folder object to an object variable. For example:
Dim oFileSys As New FileSystemObject Dim oFolder As Folder Set oFolder = oFileSys.CreateFolder("MyFolder")