FoxTrot Search Forum
FoxTrot Search for macOS Forum

Home » Public Forums » FoxTrot Search User Forum » How to exclude files by type (extension) from indexed folder
How to exclude files by type (extension) from indexed folder [message #759] Thu, 31 May 2018 22:51 Go to next message
Des Bw
Messages: 26
Registered: June 2017
Junior Member
I want to exclude some file types from an indexed folder.

I want to keep some plaintexts such as TEX to be indexed; but not Log
files.


The release note of Version 5.5.5 lists some kind of command-line
preference to exclude files by extension. But, I couldn't find any guide or
evidence on those preferences.

(shortage of a complete user guide for Foxtrot is a major hurdle; really
annoying)
Re: How to exclude files by type (extension) from indexed folder [message #760 is a reply to message #759] Fri, 01 June 2018 11:50 Go to previous messageGo to next message
FoxTrot Engineering
Messages: 404
Registered: April 2020
Senior Member
Des Bw wrote:

> I want to exclude some file types from an indexed folder.
>
> I want to keep some plaintexts such as TEX to be indexed; but not Log
> files.

In Manage Indices / Indexed Data / Index contents of files, you can disable some file types, for example logs and generic xml files.

Tex files are not indexed by contents, unless if you have a third-party application that declare them as plain text files (or if you have a tex Spotlight importer, possibly bundled with a tex editor application). In this case, they should be indexed if "plain text" is enabled in "Index contents of files" (or "document", in the case of a spotlight importer), and you can leave xml and log off.

> The release note of Version 5.5.5 lists some kind of command-line
> preference to exclude files by extension. But, I couldn't find any guide or
> evidence on those preferences.

If you don't have any third party application or importer to make tex files indexable, you can force FoxTrot to handle them as plain text files, by typing this command in Terminal.app (before launching FoxTrot):

defaults write com.ctmdev.foxtrot Aliases -array-add "{type='tex'; as='txt';}"

To do the opposite (if tex files are actually indexed by content because of an application declaring tex as a plain text type, but you don't want to index them):

defaults write com.ctmdev.foxtrot Aliases -array-add "{type='tex'; as='';}"

To do this for a filetype that have a specific binary header (in this example, to disable indexing .txt files with a uuencode header):

defaults write com.ctmdev.foxtrot Aliases -array-add "{type='txt'; headers=(); as='';}"

to reset to the default settings:

defaults delete com.ctmdev.FoxTrot Aliases


Jérôme - CTM Engineering


------------------------------------------------------------ ---------
"FoxTrot Professional is the ONLY true indexing search solution out
there that I can locate. ABSOLUTELY a life saver for text and content
searches with a WAY cool preview window that is "live" in that you
can copy and paste from it without launching the native application.
If you try it, you'll wonder where you've been, man.
I've tried all the others. This is a whole new ballgame."
FoxTrot Professional Search user comment

Download a demo version from www.foxtrot.ch
------------------------------------------------------------ ---------


Jérôme - FoxTrot Engineering
Re: How to exclude files by type (extension) from indexed folder [message #761 is a reply to message #759] Sun, 03 June 2018 05:00 Go to previous messageGo to next message
Des Bw
Messages: 26
Registered: June 2017
Junior Member
Dear Jérôme,
thank you very much. This is very useful.


On Thursday, May 31, 2018 at 10:51:40 PM UTC+2, Des Bw wrote:
>
>
> I want to exclude some file types from an indexed folder.
>
> I want to keep some plaintexts such as TEX to be indexed; but not Log
> files.
>
>
> The release note of Version 5.5.5 lists some kind of command-line
> preference to exclude files by extension. But, I couldn't find any guide or
> evidence on those preferences.
>
> (shortage of a complete user guide for Foxtrot is a major hurdle; really
> annoying)
>
Re: How to exclude files by type (extension) from indexed folder [message #778 is a reply to message #760] Sat, 16 June 2018 16:10 Go to previous messageGo to next message
Des Bw
Messages: 26
Registered: June 2017
Junior Member
This worked for a while. For some reason, FT now failed to search these TEX
files again (no difference even if I run *defaults write com.ctmdev.foxtrot
Aliases -array-add "{type='tex'; as='txt';}"* hundreds of times)

On Friday, June 1, 2018 at 11:50:08 AM UTC+2, FoxTrot Engineering wrote:
>
> Des Bw wrote:
>
>> I want to exclude some file types from an indexed folder.
>>
>> I want to keep some plaintexts such as TEX to be indexed; but not Log
>> files.
>
> In Manage Indices / Indexed Data / Index contents of files, you can
> disable some file types, for example logs and generic xml files.
>
> Tex files are not indexed by contents, unless if you have a third-party
> application that declare them as plain text files (or if you have a tex
> Spotlight importer, possibly bundled with a tex editor application). In
> this case, they should be indexed if "plain text" is enabled in "Index
> contents of files" (or "document", in the case of a spotlight importer),
> and you can leave xml and log off.
>
>> The release note of Version 5.5.5 lists some kind of command-line
>> preference to exclude files by extension. But, I couldn't find any guide
> or
>> evidence on those preferences.
>
> If you don't have any third party application or importer to make tex
> files indexable, you can force FoxTrot to handle them as plain text files,
> by typing this command in Terminal.app (before launching FoxTrot):
>
> defaults write com.ctmdev.foxtrot Aliases -array-add "{type='tex';
> as='txt';}"
>
> To do the opposite (if tex files are actually indexed by content because
> of an application declaring tex as a plain text type, but you don't want to
> index them):
>
> defaults write com.ctmdev.foxtrot Aliases -array-add "{type='tex';
> as='';}"
>
> To do this for a filetype that have a specific binary header (in this
> example, to disable indexing .txt files with a uuencode header):
>
> defaults write com.ctmdev.foxtrot Aliases -array-add "{type='txt';
> headers=(); as='';}"
>
> to reset to the default settings:
>
> defaults delete com.ctmdev.FoxTrot Aliases
>
>
> Jérôme - CTM Engineering
>
>
> "FoxTrot Professional is the ONLY true indexing search solution out
> there that I can locate. ABSOLUTELY a life saver for text and content
> searches with a WAY cool preview window that is "live" in that you
> can copy and paste from it without launching the native application.
> If you try it, you'll wonder where you've been, man.
> I've tried all the others. This is a whole new ballgame."
> FoxTrot Professional Search user comment
>
> Download a demo version from www.foxtrot.ch
>
>
>
>
Re: How to exclude files by type (extension) from indexed folder [message #779 is a reply to message #778] Tue, 19 June 2018 16:20 Go to previous message
FoxTrot Engineering
Messages: 404
Registered: April 2020
Senior Member
Des Bw wrote:

> This worked for a while. For some reason, FT now failed to search these TEX
> files again (no difference even if I run *defaults write com.ctmdev.foxtrot
> Aliases -array-add "{type='tex'; as='txt';}"* hundreds of times)

You may try to reset this setting completely:
- quit FoxTrot
- make sure that all FoxTrot Processes have stopped, using Activity Monitor
- type the following command in Terminal.app:
defaults delete com.ctmdev.foxtrot Aliases
- launch FoxTrot (this will reset the setting to the default value, which is not empty)
- quit FoxTrot again
- then add your custom setting again:
defaults write com.ctmdev.foxtrot Aliases -array-add "{type='tex'; as='txt';}"
- then relaunch FoxTrot, and rebuild your index


Jérôme - CTM Engineering


------------------------------------------------------------ ---------
"FoxTrot Attaché Search is an iPad and iPhone companion to FoxTrot
Personal and Professional Search, far and away the most powerful
search and indexing application on the Mac. It leaves applications
like Spotlight, Devonsphere Express and Found for dead.
With Foxtrot Attaché, one can now take those indices and the contents
with you. This means I can take all my emails with me or the contents
of 1000 academic articles."
FoxTrot Attaché Search user comment on iTunes Store UK

Download a demo version from www.foxtrot.ch
------------------------------------------------------------ ---------


Jérôme - FoxTrot Engineering
Previous Topic: Very unsatisfied FoxTrot Search Server + Professional Search: client not connecting to the server
Next Topic: [ANN] FoxTrot Search 6.5b1 available for testing
Goto Forum:
  


Current Time: Fri Nov 01 01:35:10 GMT+1 2024