From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Lauching txt file using command line

Hi,

I need to open a txt file in NotePad from LabVIEW. I made a small VI (attached) using command line with the file path and NotePad.exe path.
When I run it NotePad is launched but my txt file is not open, only a new "untitled.txt" Smiley Sad

I did the same but using Excel instead of NotePad and my txt file is opened properly in excel Smiley Surprised

Anybody can explain me why it's not working with NotePad ??

Thanks in advance !

Message Edité par TiTou le 08-25-2006 08:59 AM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 1 of 7
(2,896 Views)
TiTou
 
Your command line is coming out as this
 
"C:\WINDOWS\system32\notepad.exe""U:\temp.txt"
 
but you need this with the space in between command and filepath
 
"C:\WINDOWS\system32\notepad.exe" "U:\temp.txt"
---------------------------------------------------^
 
David
 
Edit: I should know better when trying to line up fonts but hopefully you get the idea Smiley Very Happy

Message Edited by David Crawford on 08-25-2006 08:13 AM

Message 2 of 7
(2,891 Views)
Indeed, thanks alot David, it works with notepad when I add the "space".

But still... without the space it works with MS Excel and not with notepad... weird, no ?

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 7
(2,886 Views)

For me, no. On my system running WinXP and LV8.0, neither of the command lines work without the space.

David

0 Kudos
Message 4 of 7
(2,882 Views)
Well... Running LV 7.1.1 on WIN XP PRO, it works with Excel without space... Weird !
Anyway now I know I need to add a space.

Thanks again 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 7
(2,880 Views)

To complete the comparison I am using Excel 2003 + SP2. You are using a different excel version from me.

cya

David

0 Kudos
Message 6 of 7
(2,878 Views)
Hmmm... I tried with LV 8.0.1 and I get the same results.

Using Excel 2002, and XP pro SP2.

Excel version seems to be the point 😉

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 7 of 7
(2,874 Views)