LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open all the text files within a folder at once so that they run through my VI in the correct order and the VI only needs to be ran once per folder?

Solved!
Go to solution

Uh oh, that's not good

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 11 of 18
(1,828 Views)

hi caro16av

 

i was trying to do this but the error keeps popping. hope you can help me with this. thanks 🙂

0 Kudos
Message 12 of 18
(1,781 Views)

Hi ceciliap004,

 

I have a question, is the Folder path to were all your images are stored called ",lk;tkw;lk.jpg" ?

 

If that is not the case, then the error is actually comming from what you are setting in the Path control.

There you just have to set the path to the folder. if this is not the path to the folder: C:\\Users\nico\Pictures\,lk;tkw;lk.jpg.

What you can do is actually set the path as C:\\Users\nico\Pictures\, and the List Folder.vi will look for all the .jpg files inside that folder and output an array (filenames), with all the images names on the folder.

 

So in  the loop is where you are taking the filenames array and building the path to each image.

 

Please let me know how it goes.

 

Regards,

 

Carolina.

 

 

 

0 Kudos
Message 13 of 18
(1,741 Views)

Hi carolina,

the name ,lk;tkw;lk.jpg is the filename of a picture file inside the folder  C:\\Users\nico\Pictures\

i was just trying to choose the folder but it just open the folder. so i just chose a picture within the folder.

 

hope you can still help me. thanks

 

cecilia

0 Kudos
Message 14 of 18
(1,692 Views)

You need to set your file path to just select folders.

 

You can't pick a file in that control because the List Folder function can't work on a file.  It can only work on a folder.  It then returns a list of files that are *.jpg then appends each of those filenames to the folder path.

 

If you are just trying to pick a single file, then eliminate everything you've shown because that was the solution to your original question of how to go through all the files within your folder.

 

 

0 Kudos
Message 15 of 18
(1,677 Views)

Hi ceciliap004,

 

As RavensFan said, the path should just be the Folder were your pictures are. Then the List Folder function will set a string array with all the names of the .jpg files you have in that folder.

 

Regards,

 

Carolina 

 

0 Kudos
Message 16 of 18
(1,620 Views)

hi carolina and Ravensfan

 

thanks a lot guys i got my vi running. just like you said i just put the path of the folder where the pictures are. 

0 Kudos
Message 17 of 18
(1,598 Views)

by the way this what i was trying to do. also i hope you can still help me with this. i would like to put LED indicators that would light whenever the path corresponding to it is shown. like if the path contains 1.jpg LED 1 would light. im used to text based programming so i was thinking that if i could output index array (nth order of the image file in the folder) i could just put some boolean condition for the LED when i tried it a file path indicator appeared. is what im trying to do makes sense or is there a better way to do it?

 

thank you so much guys. i know youve helped me enough but i hope you could help me again. 🙂

0 Kudos
Message 18 of 18
(1,589 Views)