Welcome to the Mythicsoft Q&A site for:

- Agent Ransack
- FileLocator Lite
- FileLocator Pro

Please feel free to ask any questions on these products or even answer other community member questions.

Useful Links:

- Contact Us
- Help Manuals
- Mythicsoft Home
0 votes

Is it possible for the Hits field to show a count of the number of matches for a specific search criteria in the filename?

Specifically, I want to be able to identify how many underscores there are in each filename for lots of files in a folder.

by (1.8k points)

1 Answer

0 votes
 
Best answer

The LINE operator you should be able to do what you want. Make sure you have switched ON the option Include file name in content search in the Configuration -> Character Processing Settings. This prepends a 'special' file name line to the contents of the file, so using the contents search we can match against line 0 to search just the file name and calculate a hit count.

Try this:

Containing text: LINE:0 _
by (87.4k points)
Unfortunately not. Resulted in no matches.
Also tried LINES:0 _
Also tried with _ in the File name box as well as the Line operator.
No matches at all.
Expression type set to Boolean in both cases.
Make sure you have 'Include file name in content search' switched on in the Character Processing Settings.
Thanks, that was the key.
Whilst this is a valid workaround, showing the number of matches in the hits column is more intuitive.
The current search algorithm assumes a single match for filename searches, regardless of how many actual matches there are. Consequentially, the hits column remains blank (assuming no Containing text criteria is used).   
Only showing the filename is satisfactory in most use cases. However, if no other changes to FLP were made, it would be useful if the Reports tab documented the count of filename matches and / or the actual matches.
Thanks.
...