Example Code

Batch File Renamer 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

Overview

This program was created to allow a user to modify the names or a large number of files without the need of renaming every individual item.

 

Description

The code reads from a user selectable directory on disk and gets the name of every file in that specific folder. The user can then select a destination path, base name and extension for the new files. The files are renamed based on date order.The 2D sort function was modified to accept strings rather the DBLs.

 

Please note the Sort 2D array function was not created by myself and was taken from an example on the community:

https://decibel.ni.com/content/docs/DOC-12264

 

 

Requirements

 

Steps to Implement or Execute Code

  1. Select a source path and desired path
  2. Select a base name tag and extension
  3. Choose whether you want the original files to be overwritten
  4. Run the program

Additional Information or Resources

VI Block Diagram

 

 capture.JPG

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

__________________________
Aidan H

Applications Engineer
National Instruments UK & Ireland

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