FoxTrot Search Forum
FoxTrot Search for macOS Forum

Home » Public Forums » FoxTrot Search User Forum » Exclude .css files (Want to exclude css files from index)
Exclude .css files [message #1827] Mon, 29 July 2024 16:16 Go to next message
AJKS
Messages: 53
Registered: June 2020
Member
How can I set an index to exclude .css files?

I assume they are indexed because they are text files, and I need other text files (eg html) to be indexed.

Can we add a function to exclude files by filetype or suffix?

Thanks

Re: Exclude .css files [message #1828 is a reply to message #1827] Mon, 29 July 2024 16:19 Go to previous messageGo to next message
AJKS
Messages: 53
Registered: June 2020
Member
Also, can I use a smart exclusion tso it knows to not index a folder id the folder is called "CSS" or "JS" or "XML" or whatever.

Thanks
Re: Exclude .css files [message #1840 is a reply to message #1827] Tue, 27 August 2024 12:10 Go to previous messageGo to next message
FoxTrot Engineering
Messages: 406
Registered: April 2020
Senior Member
You can enter a Terminal.app command for this. See "Disabling Indexing Specific File Types" in our FAQ:
to disable indexing the contents of a specific file type (replace extension by the actual filename extension); you will then need to rebuild your index:
defaults write com.ctmdev.FoxTrotShared Aliases -array-add "{type='extension'; as='';}"


Jérôme - FoxTrot Engineering
Re: Exclude .css files [message #1841 is a reply to message #1828] Tue, 27 August 2024 12:18 Go to previous messageGo to next message
FoxTrot Engineering
Messages: 406
Registered: April 2020
Senior Member
Quote:
Also, can I use a smart exclusion tso it knows to not index a folder id the folder is called "CSS" or "JS" or "XML" or whatever.
You can't do this at indexing time (you can only exclude folders you manually add to the "skipping these subfolders" pane).
You can however filter out files found in such folders at search time, by adding this criterion:
[then apply advanced filter] [full path] [does not contain the string (or "does not contain any of the strings"] [ignore case + multiple strings] [/css/—/js/—/xml/]
(use the em-dash character as a separator)


Jérôme - FoxTrot Engineering
Re: Exclude .css files [message #1867 is a reply to message #1841] Tue, 01 October 2024 13:40 Go to previous messageGo to next message
AJKS
Messages: 53
Registered: June 2020
Member
Late response here from me: just to say thanks.

Re: Exclude .css files [message #1868 is a reply to message #1867] Tue, 01 October 2024 15:56 Go to previous message
FoxTrot Engineering
Messages: 406
Registered: April 2020
Senior Member
As I indicated recently in another post, there is in fact a hidden preference to do that.
See "Skipping some folders at indexing time" in our hidden Preferences documentation
For example, to skip all whole folders named "CSS" or "JS" (case insensitive):
defaults write com.ctmdev.FoxTrotShared SkipPathRegex -array -string '(?i)/CSS$' -string '(?i)/JS$'
(This will also skip individual files that match the patterns)


Jérôme - FoxTrot Engineering

[Updated on: Tue, 01 October 2024 15:59]

Report message to a moderator

Previous Topic: macOS Sequoia 15.0 disables third-party QuickLook plugins; will indexing epubs still be available?
Next Topic: Some files won't index even when manually invoking the indexer
Goto Forum:
  


Current Time: Thu Nov 21 11:08:21 GMT+1 2024