# How can I identify drive letters available to a computer?

**URL:** <https://clarionhub.com/t/how-can-i-identify-drive-letters-available-to-a-computer/9079>\
**Category:** questions\
**Tags:** winapi\
**Created:** [April 28, 2026, 4:27am UTC](https://clarionhub.com/t/how-can-i-identify-drive-letters-available-to-a-computer/9079 "2026-04-28T04:27:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenns](https://clarionhub.com/user_avatar/clarionhub.com/kenns/32/6428_2.png) [@kenns](https://clarionhub.com/u/kenns)\
**Post date:** [April 28, 2026, 4:27am UTC](https://clarionhub.com/t/how-can-i-identify-drive-letters-available-to-a-computer/9079/1 "2026-04-28T04:27:43Z")

</div>

I am trying to establish data paths for an application that could have data on a local drive or on a network share. My process is to select a drive letter, and then nominate a folder name. It then creates an INI file with the path stored and creates the folder on the nominated drive. The process works fine, but relies on the operator knowing which drive letter to use.  
Is there a way within Clarion (9.0) to get a list of available drive letters, both local and networked that can then be put in a queue for selection?  
Regards

---

<div class="post-metadata">

**Author:** ![LANSRAD](https://clarionhub.com/user_avatar/clarionhub.com/lansrad/32/4519_2.png) [@LANSRAD](https://clarionhub.com/u/LANSRAD)\
**Post date:** [April 28, 2026, 4:51am UTC](https://clarionhub.com/t/how-can-i-identify-drive-letters-available-to-a-computer/9079/2 "2026-04-28T04:51:01Z")

</div>

Our Swiss Army Knife, vuFileTools has several different methods that list the drives, but the one with the most details is: vuGetDriveListEx

It’s fast and it works with identifying all drive types.

You can see the docs on it here (and the other functions are all online too)

> **[vuGetDriveListEx](https://clarionproseries.github.io/docs/vuFileTools/functions/vuGetDriveListEx.html)**
>
> Retrieves an extended list of available drives with detailed information for each. The results are written into a caller-provided buffer as text, with fields separated by commas and records separated by CRLF. Each record contains drive attributes...

The function example shows how to load them into a queue.

It will also tell you extended information about each drive.

There are over 200 things it can do for Clarion developers and we are about to add even more!

[https://www.clarionproseries.com/html/vufiletools.html](https://www.clarionproseries.com/html/vufiletools.html)

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [April 28, 2026, 6:50am UTC](https://clarionhub.com/t/how-can-i-identify-drive-letters-available-to-a-computer/9079/3 "2026-04-28T06:50:48Z")

</div>

GetDriveType() API function. You loop through A to Z and try them all passing `'A:\'` to `'Z:\'`

```clarion
GetDriveType(*CSTRING DriveRootPath),UNSIGNED,PASCAL,RAW,NAME('GetDriveTypeA'),DLL(1)

!github.com/MarkGoldberg/CwUnit Libsrc FilesHelper.inc

!For API Call: GetDriveType
DRIVE_UNKNOWN EQUATE(0)
DRIVE_NO_ROOT_DIR EQUATE(1)
DRIVE_REMOVABLE EQUATE(2)
DRIVE_FIXED EQUATE(3)
DRIVE_REMOTE EQUATE(4)
DRIVE_CDROM EQUATE(5)
DRIVE_RAMDISK EQUATE(6)

```

You may find [Mark’s File Helper](https://github.com/MarkGoldberg/CwUnit/blob/7da6ce4b682ebbd2d9016510dbbe121c9a5712f7/Libsrc/ctFileHelper.clw#L33) class useful.

Please post back your code you created

> **[GetDriveTypeA function (fileapi.h) - Win32 apps](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdrivetypea)**
>
> Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. (ANSI)
