LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use LabVIEW to open Windows Explorer to a certain directory?

I'm using LabVIEW 8.5 to create Excel and Word files in certain directories.  Can I use it to also open Windows Explorer to a certain directory so the user can work in that directory?  It is the same directory that the Excel and Word files are saved in.

 

Thanks!

Patty

Message 1 of 24
(29,235 Views)

Use the Open URL in Default Browser (under Dialog & User Interface -> Help) and wire a path to it. Easy as pie. Smiley Wink

 

Message Edited by smercurio_fc on 04-28-2009 05:39 PM
Message 2 of 24
(29,227 Views)

I think that will open the folder in Internet Explorer or whichever browser is the system default. You can do the following to open it in Windows explorer using the System Exec command.

 

 

Edit: Okay, I was wrong, smercurio's method works great!

Message Edited by Jarrod S. on 04-28-2009 05:57 PM
Jarrod S.
National Instruments
Message 3 of 24
(29,217 Views)

Is there a special addon that I need in order to run this?  I get an error # 7. 

 

Thanks!

Patty

0 Kudos
Message 4 of 24
(29,205 Views)

Error 7 means your file wasn't found; check your path.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 5 of 24
(29,201 Views)

You could also try this...

 

example code

(You may need to change 'WINNT' for 'Windows' depending on the target system. Actually... you can just put 'explorer.exe /n ,/root,' and remove the full path to explorer.exe.)

Message Edited by Troy K on 04-29-2009 09:37 AM
Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Message 6 of 24
(29,193 Views)

Jarrod S. wrote:

I think that will open the folder in Internet Explorer or whichever browser is the system default.


It shouldn't. It should open Windows Explorer. I tested it, and verified it opens Windows Explorer. The key is that the path must be to a folder, and not to a file.

0 Kudos
Message 7 of 24
(29,148 Views)

I was able to get the Open URL in Default Browser to open Windows Explorer but it did not open to the directory I specified.  It went to the default directory (file://localhost) instead of the path I specified (Z:\FY2009 Jobs\100000\).  Are there any issues with working with a network drive?  All of our computers have the same defined Z drive.  Or is there some default setting that I need to change?

 

Thanks,

Patty

0 Kudos
Message 8 of 24
(29,136 Views)
You are probably wiring the path in as a string. Were you using that VI when you got the error 7? That would happen if the string contained spaces. Use a path constant or control, not a string.
0 Kudos
Message 9 of 24
(29,125 Views)

I was also unable to get the "Open URL in default browser" to work with a network directory specified as "\\NetworkDir\NetworkSubDir" (i.e. not a mapped drive).

 

"Open URL in default browser" worked for local paths, but I had to use the System Exec method  to open a network directory.

Message 10 of 24
(28,789 Views)