LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

select path with command

Hi all .
My needs are to read a folder depending on a command activation.
I have a folder that contains files (I dont know how many, I dont know there names.). Then I want to open one of this files with a command like a "ring command" or "enum command".
When I select the file name in the ring, the vi return the complete path of the file.
To be sure to be understood, an example :
I have a folder under c:\
The folder name is "john"
In "john", I have a list of files for example :
"hobbies" "work" "personnal" "age"...
(I must insist on the fact that I dont know how many files they are.)
Then I select in a ring command "hobbies" "work" "personnal" or "age" ...
The vi return the complete file path.
How to do that?

If it's easy for you, t
hen the global question is : hox to select a file contain in a folder contain in a folder, with two ring command.
Like : c:\john\work\david.doc
or c:\thomas\hobbies\computer.ppt

Thanks in advance.
0 Kudos
Message 1 of 7
(3,224 Views)
Her is a vi that will open a folder and put in its contents into a menu ring then when you hit open file it will open the file in the ring. I hope this helps. if you need further assistance just ask.

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 7
(3,224 Views)
thank you jhoskins.
Your vi correspond to what I need, but some questions are left.

First , can you explain me where the folders names in the ring menu come from?
I dont understand where they are....

Second, can you just ad some text in your vi to explain how it works.

Thank you.
0 Kudos
Message 3 of 7
(3,225 Views)
this is a really simple little VI. But i added some Doc. to it so maybe you will be able to understand it better.In the path control put the path for your folder that you want to be able to select the files from. then hit update list, doing this will update the ring with the files in the folder that you specified in path control, then hit open file this will bring up a program(runapp.vi)hit enter then it will open the file for you with the default application.and just to answer your question where the folder names in the ring come from, if you look at the block diagram in the update list event you will see the list vi and out from that is a property node of the ring control, this is where the names com from.

Hope this helps more

J
oe



Joe.
"NOTHING IS EVER EASY"
Message 4 of 7
(3,224 Views)
Ok.
I understand how your vi work...
But there is one problem left.
I want to be able to scan the files AND the folders contained in my folder I scan.
Example : folder "john" contains 3 folders and 4 files.
How can I have a ring menu with both file names and folder names?
Because my measures are filed in folders and there are different folders and different files in those folders...
I dont know both the name of the folders and those of the files...
I try to do the way you show me, but the "list" command do no show the folders....

How doing???

Thank you.
0 Kudos
Message 5 of 7
(3,224 Views)
this shouls take care of what you want. If it does not please be more specific as to what you are looking for or repost your question and I will not answer it.

Hope I helped some

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 6 of 7
(3,224 Views)
thank you joe.
Your vi work well.
I try to use it in my programm, but it does work because it is in llb.
Can you send me a version not in llb ! but in .vi
Thank a lot.
0 Kudos
Message 7 of 7
(3,204 Views)