MkDir Function
Creates a new directory.
The My feature gives you greater productivity and performance in file I/O operations than MkDir. For more information, see My.Computer.FileSystem.CreateDirectory Method.
Public Sub MkDir(ByVal Path As String)
|
Exception type |
Error number |
Condition |
|---|---|---|
|
Path is not specified or is empty. |
||
|
Permission denied. |
||
|
Directory already exists. |
See the "Error number" column if you are upgrading Visual Basic 6.0 applications that use unstructured error handling. (You can compare the error number against the Number Property (Err Object).) However, when possible, you should consider replacing such error control with Structured Exception Handling Overview for Visual Basic.
Security Note:
|
|---|
|
Both read and write file I/O permissions are necessary to create a directory or folder. For more information, see FileIOPermission and Code Access Permissions. |
Namespace: Microsoft.VisualBasic
Module: FileSystem
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)
MkDir will not create the full path to the new directory; it will only attempt to create the final directory contained in the path.
- 2/23/2009
- THendr2929
Security Note: