FileSystem.MkDir Method

Creates a new directory. The My feature gives you better productivity and performance in file I/O operations than MkDir. For more information, see CreateDirectory.

Namespace:  Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public static void MkDir(
	string Path
)

Parameters

Path
Type: System.String

Required. String expression that identifies the directory to be created. The Path may include the drive. If no drive is specified, MkDir creates the new directory on the current drive.

ExceptionCondition
ArgumentException

Path is not specified or is empty.

SecurityException

Permission denied.

IOException

Directory already exists.

This function creates a new directory.

This example uses the MkDir function to create a directory. If the drive is not specified, the new directory is created on the current drive.

' Make new directory.
MkDir("C:\TESTDIR")

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft