Click or drag to resize
DriveInfoGetFreeDriveLetter Method (Boolean)
Gets an available drive letter on the local system.

Namespace: Alphaleonis.Win32.Filesystem
Assembly: AlphaFS (in AlphaFS.dll) Version: 2.0
public static char GetFreeDriveLetter(
	bool getLastAvailable


Type: SystemBoolean
When get the last available drive letter. When gets the first available drive letter.

Return Value

Type: Char
A drive letter as Char. When no drive letters are available, an exception is thrown.
The letters "A" and "B" are reserved for floppy drives and will never be returned by this function.
See Also