Start a new topic

Find files with multiple different extensions

I want to run a series of tasks if a user has uploaded a .JPG or .PNG or .TIFF file, but not other files (no matter if they are considered image files or not).


Is there a syntax in Find Filter that would allow me to specify just these specific extensions, or is there a better way to do this?


If you know REGEX, you an do this.  (But I can't help you with the regex syntax on this.  But keep in mind its doing a pattern on the URL of the item, not just the name.)


REGEX:pattern


Otherwise, use three crush task items for each of those.  One for *.JPG, one for *.PNG, and one for *.TIFF.


Thanks,

Ben


1 person likes this

Does the WebInterfaces "Filter" when browsing files also allow the same REGEX:pattern syntax so I can see what is actually going to get selected for a given pattern?

Use this:


http://www.regexplanet.com/advanced/java/index.html


And use a text string like:  FILE://folder/folder/file.jpg


Match against that.  We do case insensitive regex by default.


--Ben


1 person likes this

Thanks! This is a huge help.

To give back a little for anyone else that has a similar issue:


I want to be able to find only files that match one of the following extensions (removed PNG from my original question):


  • .jpg
  • .jpeg
  • .tif
  • .tiff


To do this, I am successfully using the following Find Filter (it took me a little debugging to narrow down to this)

 

REGEX:.*\.jpe?g$|.*\.tif?f$

 

Login to post a comment