Jump to content

File filter won't see Markdown files if the File Types is set


Recommended Posts

I have a very basic Workflow that has a File Filter input and an Open object.

 

If I set the File Types in the File Filter by dragging one of my Markdown files into the Types area and then run it the Filter won't display any files. If I remove the File Type it will see the Markdown files and list them.

 

Is this a bug or am I doing something wrong?

 

The Markdown file I am using to set the File Type is from the directory listed in the Scope. 

CleanShot 2023-02-28 at 19.05.43@2x.jpg

Link to comment

So it isn't a bug but it is a result of everyone and their uncle declaring a different UTI for Markdown files. I have four different UTIs listed on my Mac

 

 net.daringfireball.markdown
 com.unknown.md
 net.daringfireball
 public.markdown

 

Once I added all of them to the File Type list it was able to show the Markdown files in the File Filter.

 

If anyone ever needs to track down the same issue this is the command you can use in the Terminal

 

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep 'uti:' | awk '{ print $2 }' | sort | uniq 

 

This would probably also be an issue if one had multiple apps attempting to create different UTIs for an open file type. 

Edited by pixelgeek
Fix grep error
Link to comment

So I found a quicker way to get a list of UTIs for an extension. It does require the duti command line app in order to run. You can get it from their website or use brew

 

brew install duti

 

Once you have that installed you can just run

 

duti -e .md |  grep UTTypeIdentifier | awk '{ print $3 }'

 

and get a list of the UTIs from there

 

public.markdown
com.unknown.md
net.daringfireball.markdown
net.daringfireball

 

I will make a Workflow for it tomorrow. Still suffering from a cold so I think I am at my limit for today 🙂

Link to comment

I shall be interested to see how you get on with finding markdown files. I wrote a small workflow following your earlier post (to search for markdown files) but it's producing some pretty odd results at the moment (notably failing to find some in the folders I've specified and finding some which are not in specified folders). I'm wondering if I'm simply still running into some aspect of the seeming Ventura search scope bug.

 

Stephen

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...