10-17-2008 10:24 AM
Hello,
I am trying to open a folder of jpeg images and save the path as an array so that I can manually display them and step through them. What is the easiest way to open a folder of images and save the images as a path array?
10-17-2008 10:29 AM
10-17-2008 10:32 AM
There is a List Folder function in the Advanced file palette. It will list all files in a folder or the list can be filtered. I use this in my
Slide Show program.
Lynn
10-17-2008 10:39 AM
One of the LabVIEW functions is called "List Folder". This VI will return an array of files that match a specific pattern. You can use this to search for all files of a specific type. From here you can use "Build Path" to turn each of the filenames into the full path or just "String to Path" to convert all of the filenames into relative paths.
Rob
05-11-2011 04:52 AM
Hi I just did what you did in the example, but the loop outputs an array of file names rather than outputting one filename at a time. How do you make it output the names sequentially to the file path input? I can't wire the file path array to the file path input.
05-11-2011 05:01 AM - edited 05-11-2011 05:01 AM
Hi,
It's not clear what you exactly mean. Check the attached vi if it is the one which you are looking for..
Regards,
Nitzz
(Kudos are always Welcome, Mark as a solution if it is the One;))
05-11-2011 08:25 AM
@MadScientist wrote:
Hi I just did what you did in the example, but the loop outputs an array of file names rather than outputting one filename at a time. How do you make it output the names sequentially to the file path input? I can't wire the file path array to the file path input.
Place the Path input in a loop. 😉
/Y
05-11-2011 09:59 AM
OK, I managed to fix the problem. My VI was already in a for loop. When I copied the example, I made a new loop inside the main loop for the path builder, which did not work. The image processing loop needed to run once for each image. I placed the list folder icon outside this image processing loop, and placed the build path icon inside it, this did the trick. Now I have run into unrelated problems to do with building a report file.
11-18-2011 11:13 AM - edited 11-18-2011 11:14 AM
I know this is an older post, but I am trying to create this array of file paths/names and it completely populates the array with all my file names, but then a dialog box comes up asking me to select a file. I don't know why it is coming up and I don't want it to. Does anyone know what may be causing this and have a way to fix it?
Thanks.
EDIT: Actually nevermind... I figured it out. It was a rogue sub VI that was off screen that was causing the dialog. Thanks though!
07-22-2015 10:03 AM
i tried to run your vi but i keep getting an error message which says file is not a resource file.