NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy and rename files………..

Hi,

 

I would like to copy and rename files using variable names with in a loop.

 

The source file is the same name but the destination file will vary depending on the loop.

 

I have Test stand 2.0.1 and windows 98

 

I have tried a batch file which will run and do the needful but Teststand will return an error and the DOS window will stay open.

 

How beat can I do this?

 

Thanks

Simon

0 Kudos
Message 1 of 4
(4,595 Views)

QW123z,

Are you running the batch file using the call executable step?
Why are you using a batch file rather than just the DOS "copy" command?
How are you passing your variable names?
What error are you getting?

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 2 of 4
(4,582 Views)
Note that you could also use a DLL step to directly call CopyFile in kernel32.dll.  It's CopyFileA or CopyFileW on w2k and up. Its probably CopyFile in Win98, but I'm guessing.
 
0 Kudos
Message 3 of 4
(4,576 Views)

Hi,

 

Thanks for the replays.

 

I will try the kernel32.dll route a try.

 

To replay to Josh W.

 

Are you running the batch file using the call executable step?

            Yes

 

Why are you using a batch file rather than just the DOS "copy" command?

            Batch file works where as “Copy” is not recognised!!

 

What error are you getting?

A message stating there was an error in "Post".

 

Attached is the batch file and the sequence step.

 

What do you suggest as the best route?

 

Thanks for the help

 

Simon

0 Kudos
Message 4 of 4
(4,543 Views)