Example Code

Find All System Root Directories

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example will return files paths to all of the root directories on your execution system. 

 

Description

Returns an array of file paths pointing to the root directories on the execution target. This can be used to check for the presence of removable drives or adapt your code to different file systems.

 

Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Run the VI.
  2. Get the directory paths.

 

Additional Information or References  

VI Snippet

136.png

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
tstahl
Member
Member
on

The same thing can be done by using a List Folder primative with a empty path constant as the path input. The folders output will contain the drive leters without the ":\".