Example Code

Change File Names in a Directory with DIAdem

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

  • Diadem

Code and Documents

Attachment

Download All

Overview

This script uses the Environment Variables provided by DIAdem to change the names of the files in the path.

 

Description

This script uses the datafilerename function to rename all of the files in a directory. You can customize this to follow your nomenclature.

 

Requirements

  • DIAdem 2012 Professional Edition (or compatible)

 

Steps to Implement or Execute Code

  1. Run the script
  2. Notice how the file names in the directory changes after running the script.

Additional Information or References 

Original filenames

capture1.JPG

After running the script:

Capture2.JPG

 

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

 

Kurt P
Automated Test Software R&D

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