LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading the folder

Hi 

thank you for your reply but I didn't undrestand where I build a path can you help me by modifying my VI file 

 

0 Kudos
Message 21 of 32
(1,750 Views)

Build Path,  in the File I/O functions.

 

image.png

0 Kudos
Message 22 of 32
(1,748 Views)

Hi

thank you ,, but you mean that all the program that I did is false 

0 Kudos
Message 23 of 32
(1,746 Views)

@ichrakk wrote:

Hi

thank you ,, but you mean that all the program that I did is false 


Your program doesn't look like the piece of code I showed above.

 

The only thing you open is the last thing that is picked, I assume the filename.  I don't see how your program knows which subfolder that file is in

 

Also, all your combo boxes seem to put out arrays.  That means they are set to select multiple items rather than just one.  That doesn't seem like it would work if you are are trying to drill down through a folder structure.

 

Take several steps back.  Create a VI that opens a single file successfully.  Then change it so you can select a single folder than pick a file to open.  Start at the beginning, take small steps, and build up your VI as you succeed with the first steps.

0 Kudos
Message 24 of 32
(1,744 Views)

@RavensFan wrote:

Also, all your combo boxes seem to put out arrays.  That means they are set to select multiple items rather than just one.  That doesn't seem like it would work if you are are trying to drill down through a folder structure.


Those are not Combo Boxes.  The OP used List Boxes, which do have the option (I think default) to be able to select multiple items.  The OP needs to make sure that the selection option is set to 1 item.  This would eliminate all of those FOR loops.

 

Furthermore, that code is way too complicated with being forced into a sequence.  What if you accidentally select the wrong year?  You have to go through the full process again.  If you setup the code like my last example, you can build up the sequence in a single simple loop with an event structure, allowing for corrections as the process continues.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 25 of 32
(1,735 Views)

hi 

thank you but really I am verry depressing I can't ressolve this prooblem 😞 

0 Kudos
Message 26 of 32
(1,734 Views)

HI

I tried to what you tell me but it's not working can you have a look at it .  

0 Kudos
Message 27 of 32
(1,731 Views)

You cannot have multiple event structures, (you can, but only if you know what you are doing), but definitely not ones embedded in each other like you do.  Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2016 Help

 

If I get a chance, I'll try to modify this VI.

0 Kudos
Message 28 of 32
(1,713 Views)

I am sorry you are having such a hard time.  Unfortunately, when you originally posed your question, some of us (like myself) didn't understand what you needed, and gave you some (probably confusing but certainly) wrong advice.  Since then, you've been given a number of suggestions, several of which may be a bit too complex for you to get quite right, judging by your last responses.

 

I've gone back to your original Stage.vi, where you have 5 inputs that name the Top Level Folder, Year, Month, and Day folders, and the name of a Text file.  The Year, Month, Day, and Text names are given as numbers, which I assume are meant to be the names of the Folder.  Thus a Year folder might be named "2018", a 4-digit number.  I'm assuming Year is a 4-digit number, month and day are two-digit (with leading zero), and the Text file is "just a number" (i.e. "1", "2", etc.), without leading zeros.

BS Stage.png

This code will create a full Path name from the numeric data you present (by default it creates the path "0000\00\00\0.txt", using the Empty Path and default 0 numeric values).  It does no error checking to see if such a folder exists.  It may not be what you are looking for, but I'm still not convince that I, for one, know what that is (clearly the suggestions we've been making haven't seemed to be helpful to you).

 

I'm hoping a suggestion, even if to the "wrong problem", will at least get you going to say "Close, but I really need ...".

 

Bob Schor

0 Kudos
Message 29 of 32
(1,705 Views)

HI 

thank you for your reply I am so happy because you help me ,, forgive me please  😉 

0 Kudos
Message 30 of 32
(1,702 Views)