01-07-2016 03:22 AM
I have to search a folder and his subfolders for .png data(only in subfolder are files), when I find a png file I have to write the number of them in an array(for every folder one).
But somehow I am a bit lost here, can someone help me?
Solved! Go to Solution.
01-07-2016 03:28 AM
Hi NoName,
where are you lost? What is your problem?
Comments:
- There's a function/VI in the file palette that determines the file suffix (like "png"), no need to do that "manually"
- Learn about using shift registers!
- You don't need that inner while loop!
- Please post a VI instead of an image. We cannot debug images…
01-07-2016 03:58 AM
here is a test VI with an example Folder and subfolder
the Result in the Array needs to be: 9 3 5
01-07-2016 04:07 AM
01-07-2016 04:23 AM
Thank you, yeah I am still in training, so shame on me
01-07-2016 04:28 AM - edited 01-07-2016 04:29 AM
A lot of this can also be simplified to a single VI:
This does a recursive directory listing and returns all .png files in the directory - it also returns a count of the files amongst other things - you may find it easier to call this in each directory (as you want the number of files in each directory, rather than the overall number of files in total).
01-07-2016 04:31 AM