LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
muks

Multiple Patterns in list folder

Status: New
When searching for a single pattern we define the pattern as *.vi (for example). If we want to filter out say three patterns like (*.c, .h,*.txt). It doesnt work that way. In file dialog if we define these patterns seperated by semicolon it returns the desired result but in list folder we have to use a for loop for multiple pattern searches. Will it not be useful if we define (*c;*.h;*.txt) in the pattern and get only these files?
8 Comments
JackDunaway
Trusted Enthusiast

Just to be sure I'm on the same page: you know this is currently possible, but would just prefer a cleaner, documented syntax? Is that the gist of this Idea?

Darin.K
Trusted Enthusiast
I believe that Muks is referring to the 'List Folder' Function where you can only specify a Windows-type wildcard (* or ?).   My guess is that this function relies on an underlying OS call, and adding this functionality will require a different implementation.
muks
Proven Zealot

Yes I was refering to the "List folder" function

 

When you do this in file dialog it works!!!

 

filedialog.JPG

 

But try defining the similar pattern in the "List folder". You dont get anything

 

list_folder.JPG

 

You will have to define a loop to get this working. Cannot the patterns be directly wired to get the multiple file types???

 

sol.JPG

 

 

jgcode
Active Participant

Another good reason to use OpenG.

Supports semicolon separated patterns 🙂

 

openg.png

Certified LabVIEW Architect * LabVIEW Champion
muks
Proven Zealot

openG is helpful no doubt. it would be better to have it built in though

Brad
Active Participant

I really like this idea. I also just got burned because on RT targets (like Linux), the pattern is case sensitive so if I have the following files in my folder  test1.png, test2.Png, and test3.PNG passing *.png will only return test1.png. It would be nice for the pattern to be case insensitive to avoid requiring all permutations of capitalization to the array of file types to look for.

X.
Trusted Enthusiast
Trusted Enthusiast

This is a bump for this idea.

I just wasted an hour until I realized that providing a pattern of "*.tif;*.tiff" to List Folder returned ZERO files, while using only "*.tif" did return plenty.

This silent killer is pernicious as it returns no error when provided a multi-file pattern!

dfousek
Member

Multiple patterns in "List Folder" function is a nice idea and I fully support it. Of course, workarounds do exist, but for the shake of completeness and compatibility with the "List Folder" dialog menu, it should be implemented in the Labview core.