Message Boards Message Boards

0
|
2298 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Run an external executable from a notebook?

Posted 1 year ago

Dear All,
I bought a tool that can convert a TDMS file in a CSV file. I need it to open some LabView data and process it with Mathematica.
From the Windows Command Prompt I have to type:

"C:\Program Files (x86)\WhiterockSoftware\TdmstoCsv\TdmstoCsv.exe" c:\temp\myfile.tdms c:\temp\myresultfile.csv

In effect, it works. I tried to call this command directly from my notebook with this script:

RunProcess[{"cmd", {"\"C:\Program Files \(x86)\WhiterockSoftware\TdmstoCsv\TdmstoCsv.exe\" C:\Users\Me\Documents\file1.tdms C:\Users\Me\Documents\file1.csv"}},"ExitCode"]

It does not work.
Where is my error?

Thank you very much for your help

POSTED BY: Bruno Vusini
2 Replies

Why is there a \ before C:?

 \C:\Users\Me\Documents\file1.tdms
POSTED BY: Rohit Namjoshi
Posted 1 year ago

Thank you Rohit for your reply. It was a transcription error. there is not a \ before C. The code is

RunProcess[{"cmd", {"\"C:\Program Files (x86)\WhiterockSoftware\TdmstoCsv\TdmstoCsv.exe\" C:\Users\Me\Documents\file1.tdms C:\Users\Me\Documents\file1.csv"}},"ExitCode"]

but it does not work

Thank you!

POSTED BY: Bruno Vusini
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract