How filter files to delete?

Hi,
I want to browse a folder to delete files. I use the Xojo recursive function “RemoveEntireFolder”
(FolderItem — Xojo documentation) but without deleting the folders.
I want to delete only certain file types (eg *.txt, *.log, etc.). How to add a file filter to the function? (and a Filter() parameter)
Thanks a lot,

You can use something similar to code I have here, where f is a FolderItem. Each of the cases (i.e. “video/mpeg”) is a Display Name of a File Type

Select Case f.Type
  
Case "video/mpeg", "video/quicktime", "video/mp4", "video/x-m4v"
  //do something with video files
  
Case "text/plain"
  //do something with  text files
Else
  //default it's not a match to files we delete
  
End Select

Example of a “video/mpeg” File Type: