Add new folder

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Is there a way that you can create a folder in file system if folder does
not exist.
Any help would be greatly appreciated.
 
There's a built-in MkDir statement.

From the Help file:

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.


Note that you can only create a single level of folder at a time. For
example, if you want C:\Folder1\Folder2\Folder3, and only C:\Folder1 exists,
you must use:

MkDir C:\Folder1\Folder2
MkDir C:\Folder1\Folder2\Folder3
 
Back
Top