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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

System exec: automatically copy data from many files to one file with command: "copy *.txt to bigfile.txt"

Hello together,

My English isn´t the best, but I hope I could explain my problem.

I use command mode to copy many files to one file (big one) to analyse data.

In command mode I could use "copy *.txt newfile.txt"

then i´ve all files with the extension .txt in the newfile.txt!

 

I want to do this automatically by LabVIEW.with the system excec.vi. 

WIN7  LabVIEW 2009.

I get Error2 back.

It sounds easy, but It doesn´t work. 

Could anyone help, maybe with short excamplecode?

0 Kudos
Message 1 of 4
(2,447 Views)

The help for System exec tell you to place a "cmd /c" before a DOS commmand.

 

Did you do that?

Omar
0 Kudos
Message 2 of 4
(2,433 Views)

Rather than use SystemExec, you could just use LabVIEW native code.

You just want to append several files into one large file?

 

You could just use the 'write to text file' and 'read from text file' VIs

 

Cory K
Message 3 of 4
(2,433 Views)

 

As Cory mentioned, this could be done in LabVIEW.

 

That said, please note that you have to supply the full path to your files in your command line with System Exec.

The "Path" input for System Exec will not provide the path as one might expect.

 

See this post:

http://forums.ni.com/t5/LabVIEW/Memory-is-full/m-p/1287754?requireLogin=False

 

The error 2 that you get from System Exec is most likely "file not found".

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 4
(2,413 Views)