Example Code

Introduction to Using File Paths in LabVIEW

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

Download All

Description

 

Overview: This example shows how to use a few of the the functions for working with paths in LabVIEW.


Description: 

 

This VI shows how could you find and use multiple folders and paths that is used in Windows, LabVIEW and user programs. It gives a paths to such directories as: VI Library, Application Directory, Current VI's Path, Temporary Directory, Default Directory, App: Default Data Directory, system directory. Also it shows how you could Strip and Build a path.


Requirements: LabVIEW 2012 (or compatible). Hardware: none.


Steps to Implement or Execute Code:

1. Select path to the file to view how you could dismember the path to it.
2. Select the system directory type interested in.
3. Run the VI.
4. Write down the results.


Additional Information or References: 

 

Introduction to Using File Paths in LabVIEW FP.png

 

Introduction to Using File Paths in LabVIEW sn.png

 

If you are looking for a way to find Windows directories (like My music) check out this example: Get Windows Folder Paths.

For help working with paths in executables check out this example. Current VI's Path (VI or Exe)

If you want to automaticly generate mltiple paths check out this example Write to Multiple Spreadsheets (csv) with Auto Generated File Names and Headers


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

 

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