Dynamically create folders

  • Thread starter Thread starter Burt Rosner
  • Start date Start date
B

Burt Rosner

Hi,

I'm writing a program and would like to create a new
folder while still in my program without using Windows
Explorer.

Something like, but not the same as, when you are
installing a software package and the installation package
creats a folder for the programs.

Any advise would be appreciated.

Thanks,

Burt
 
MkDir Statement
Creates a new directory or folder.

Syntax

MkDir path

The required path argument is a string expression that identifies the
directory or folder to be created. The path may include the drive. If no
drive is specified, MkDir creates the new directory or folder on the current
drive.
 
Good Morning!

The File System Object is very useful for doing things
like this. You will need to set a reference to
the "Microsoft Scripting Runtime" Library to use it. A
short procedure to create a folder is listed below. Good
luck!

Public Sub CreateFolder()
Dim fso As New FileSystemObject
fso.CreateFolder "C:\Temp\My New Folder"
End Sub
 
Dan,

Thanks for the information.

Burt
-----Original Message-----
Good Morning!

The File System Object is very useful for doing things
like this. You will need to set a reference to
the "Microsoft Scripting Runtime" Library to use it. A
short procedure to create a folder is listed below. Good
luck!

Public Sub CreateFolder()
Dim fso As New FileSystemObject
fso.CreateFolder "C:\Temp\My New Folder"
End Sub



.
 
-----Original Message-----
MkDir Statement
Creates a new directory or folder.

Syntax

MkDir path

The required path argument is a string expression that identifies the
directory or folder to be created. The path may include the drive. If no
drive is specified, MkDir creates the new directory or folder on the current
drive.


--
Kailash Kalyani
MEA Developer Support Center
ITWorx on behalf Microsoft EMEA GTSC




.
Kailash,

Thanks. That did want I wanted.

Burt
 
Back
Top