Example Code

Programmatically Iterate through Sequentially Named Files

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 VI demonstrates how to programmatically create files that are sequentially named, for instance File1, File2, File3

 

Description

By stepping through and creating the file path in sections (i.e. "File", "#", and ".txt") in a loop, we can change just the numbered portion of the file path so that we can open sequentially named files.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Select the folder you would like to store the files in.
2. Run the VI.

 

Additional Information or References

Snippet.png

Cheers,
Kelly R.
Applications Engineer
National Instruments

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