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
(3,373 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
(3,361 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
(3,359 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
(3,357 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
(3,348 Views)
This only returns the file extension you will specify. Also you can check this recursive vi
0 Kudos
Message 6 of 11
(3,329 Views)

Hi!

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

 

0 Kudos
Message 7 of 11
(3,325 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
(3,310 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
(3,302 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
(2,802 Views)