Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 5 out of 5     Rate this Document

How Can I Programmatically Rename a File using TestStand?

Primary Software: TestStand
Primary Software Version: 3.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I would like to use TestStand to programmatically rename a file stored somewhere on disk.  How can I do this?

Solution:
One simple solution is to call directly into the Windows command line and pass command line arguments that capitalize upon the rename function.  This function takes as its parameters:
  1. The path to the file to be renamed and
  2. The desired new name of the file.
For example:

/c rename c:\\OriginalName.txt NewName.txt


A sequence demonstrating this process has been attached below.

Related Links:

Attachments:
Rename File ExampleRename File 3-1.seq




Report Date: 03/28/2008
Last Updated: 03/31/2008
Document ID: 4JRI1R6X

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit