From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

List Folder VI pattern input

I would like to search the *.c,*.h and *.cfg files using List Folder and finally to find out / filter the folder path alone for the selected *.c,*.h and *.cfg files.

How to do that?.

Is it possible to give *.c,*.h,*.cfg as a pattern input to the List Folder? If i give *.c,*.h,*.cfg as a pattern input it is goving error.

please help.

 

0 Kudos
Message 1 of 11
(8,085 Views)

The "pattern" uses the same sintax as the wildcards of the dir (Windows) command, so you cannot use  "*.c,*.h,*.cfg".

Use instead List folder three times, one for each extension, and then join the files you get

 

Marco

0 Kudos
Message 2 of 11
(8,073 Views)

In windows it is possible to search using the combination of *.c,*.cfg,*.h.

If it is same as windows it supposed to work. please correct if i am wrong?.

Please send example document which gives details related to pattern or regular expression.

0 Kudos
Message 3 of 11
(8,071 Views)

seperating the file name with semicolon works for file dialog but not for list folders

 

You can try something like this

 

list.JPG

Message 4 of 11
(8,069 Views)

Is it possible to remove the duplicate file name from the filename output from the List folder?.

whether i need to use complicated sorting?

0 Kudos
Message 5 of 11
(8,060 Views)
This only returns the file extension you will specify. Also you can check this recursive vi
0 Kudos
Message 6 of 11
(8,041 Views)

Hi!

Kals, do you expect to have files with the same name in the same directory?

 

0 Kudos
Message 7 of 11
(8,037 Views)
The file name would be same in different directory. But the output from list Folder filename is going to same. i would like to remove duplicate filename.
0 Kudos
Message 8 of 11
(8,022 Views)

Kals wrote:
The file name would be same in different directory. But the output from list Folder filename is going to same. i would like to remove duplicate filename.

You can delete it from the array that you are getting right?

0 Kudos
Message 9 of 11
(8,014 Views)

I edited the idea slightly.

 

This vi accepts a pattern string separated by semicolons and outputs a 1D array instead of a 2D array.

 

This is how the "List Folder.vi" SHOULD work.

0 Kudos
Message 10 of 11
(7,514 Views)