LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Recursive File List VI

I would like to find the path of all the folders for the files *.c;*.h and *.cfg.

 

i am giving the pattern for each *.c;*.h and *.cfg in for loop. finally appending in to the array. Now it contains duplicate paths and  exist in the array in the end of for loop.

 

i would like to check the each path before appending array. How to store the output path in to the array before the for loop?.

 

 

how to find the the entry already exist?.

 What is the best way to do it?.

0 Kudos
Message 1 of 6
(3,309 Views)

hi kals,

  The best way you can do this is using "list folder "vi which is present in file pallette.Now wire the pattern as *.c,*h and *.cfg...The output will be arrays(no duplicates) of all those files..Build an array with all these outputs..Then the resulting output will be an array with *c files,*.h files and *.cgf files...

 

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 6
(3,297 Views)

I need to find the files inside the sub folder also. Finally i want only the paths.

How to remove duplicates?.

 

0 Kudos
Message 3 of 6
(3,288 Views)
Use Recursive File List.vi.  It has both file and folder outputs.  It can be found in the File I/O » Advanced File Functions palette.
0 Kudos
Message 4 of 6
(3,271 Views)

Yes I am using Recursive File List VI. I am getting file lists with path for each *.c and *.h together that i am using pattern in for loop.

Now i would to order the list based on folder names. How to do it?.

0 Kudos
Message 5 of 6
(3,261 Views)
The Sort 1D Array primitive should do what you want.  It will sort the path list in alphabetical order, which is also by folder.
0 Kudos
Message 6 of 6
(3,227 Views)