From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Scan a directory and create the next consecutive file with 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

Overview

This application will scan a given directory for consecutive file names and will create the next file name in line. It assumes a certain naming scheme: File001.txt, File002.txt, File003.txt, etc

 

Description

This VI is meant to work with the above naming scheme only since it works by extracting characters 5-7 of the filename, but this can be modified in the code

 

Requirements

Software

LabVIEW 2012  (or compatible)

 

Steps to Implement or Execute Code

  1. Open the file Limit Remote Front Panel Connections - LV2012 NIVerified 

 

Additional Information or References
Block Diagram

 scan directory and create next consecutive file snippet - LV2012 NIVerified.png

 

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

Misha

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

Comments
mishkin
NI Employee (retired)
on

Great suggestions, thanks Greg!

Misha