Example Code

Creating File Names Programmatically Using 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.


  • LabVIEW

Code and Documents



This example demonstrates how to programmatically create file names with a standard pattern.



This example create a file name that includes a test number, and a time stamp. The test number in the file name will be programmatically incremented every time a new file (or test) is created.




  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

1. Run the VI.
2. Push the "Write a New File" button.
3. File name will be generated related to time and iteration.


Additional Information or References



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

Eli S.
National Instruments
Applications Engineer

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

Todd S.
NI Employee (retired)

Good stuff, thanks!

Todd S.
LabVIEW Community Manager
National Instruments