Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to search filenames only (Read 2077 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to search filenames only

Hello,

I'm a newcomer to Foobar2000 and really like the ability to customise it but I'm struggling a bit with this one...

I'd like to search file names only, not file paths.  I'm using the default 'media library search' which works brilliantly but the results
seem largely based on the file path and I want the search results to be based on the file names only.

I have a big sound effects library (about 60,000 FX). 
I'm using the filenames to hold the vital info about what each effect is.
I'm not interested in the metadata that might be embedded in some of the files and don't
want to search the metadata...it will often be worthless or wrong.

So I'd love to search the file names only and have the search results based on file names only.

At the moment if I search for 'water' a lot of the files in the search results may be in a folder called 'Construction and Water'
...the effects might not be watery fx at all!

Any help gratefully received.

Cheers

Geoff


How to search filenames only

Reply #2
Ben,

Thanks for this.  Succinct and to the point :-)

If I type %filename% HAS  into the search box before 'water' then I get the results I want. Great.

Does %filename% HAS have to go in the search box to make the search work as I would like?

Perhaps there's a neater solution?

Cheers

Geoff

How to search filenames only

Reply #3
Does %filename% HAS have to go in the search box to make the search work as I would like?

yes.

Quote
Perhaps there's a neater solution?

not that i know of. *cough* nothing to see here.

How to search filenames only

Reply #4
Thanks Marc,

I'm having a play with the component  'Facets 1.0' which does offer search filter functionality.

I haven't yet got it doing what I'd like but I think there's hope!

Thanks both for your time.

Cheers

Geoff

How to search filenames only

Reply #5
You should be able to set up foo_quicksearch to look for filenames only and add it to your layout.  That way you don't have to enter '%filename% HAS' over and over. A facets filter would most likely be sufficient too, if you happen to use that component anyway.

How to search filenames only

Reply #6
foosion's component would do this:
http://foosion.foobar2000.org/components/?id=dbsearch
Under format presets just add:
%_filename%
If it's not there already.

C.

EDIT: And foo_quicksearch as Daeron pointed out. They do pretty much the same job. Personally I prefer foosion's component.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

How to search filenames only

Reply #7
Daeron and Carpman,

Thanks both.  I shall have a play with both of those and see if I can get a good result.

Cheers

Geoff

How to search filenames only

Reply #8
<MOAN ON>
It was bothering me, cause I couldn't remember what it was about foo_quicksearch that annoyed me, and consequently why I preferred foosion's foo_dbsearch.
After a little playing around .. it's this:
foo_quicksearch, for some reason, populates (when search as you type is enabled) the search results playlist even when the result is null. The caveat is that it does tell you by a change in search bar colour that the search found no results but the playlist is still populated by the results found until the point at which the search failed. When IMO the results playlist should be empty at the point at which the search "fails".

Example:
If I type T E N F R I X 
I get a playlist populated by results matching TEN. Yet I have nothing that matches TENFRIX so the results playlist should be empty. This is the case with foo_dbsearch, and to me it's the logical and correct approach.

foo_quicksearch has some nice features - but for some reason this really bugs me. So in case the OP is interested I thought I'd mention what I perceive is more a bug than a feature. That said foo_quicksearch has a nice search history and has bookmarks etc ... 
</MOAN OFF>

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

How to search filenames only

Reply #9
I've had a play with Facets, Quick Search and Database Search and I'm still struggling to achieve what I want,
although I suspect if I knew what I was doing it would be possible!

Here's what I want.....
A library search just like the default media library search that returns results for filenames only.
The search results to update as I type.
The search text box and results to be an integral part of the main layout.

My experience
I'm using the default Foobar2000 with the standard interface. 
I'm using tabs to provide the separate tools that I want.

I can add Facets to a tab but I can't make it search filenames only. I added a filter in Facets preferences
'%filename% HAS'  ...but this doesn't work.  Any pointers for me 'cos this could do the trick?

Database search - works exactly as I would like ...it updates the results as I type, it looks for all my search
words in filenames irrespective of the word order (perfect for me).  However....I can't find a way to incorporate
the search box into the layout.  I can only use it as a popup box from the Library menu.

When I add Quicksearch to a tab the layout goes wrong and the tabbed window space shrinks to nothing at
the bottom of the Foobar window.  Quick search seems to require a press of the enter key to submit a search
ie No real time updating of the search results as I type.

It could save me a lot of fiddling if some kind soul could help me out....

Cheers

Geoff


How to search filenames only

Reply #10
Here's my basic setup with foo_dbsearch (along with its associated toolbar demo api !! important). The component comes with 2 dlls -- you need both. The foo_dbsearch_api_demo.dll is the one that allows the toolbar (see image). I'm pretty sure it works fine with the Default UI (the pic below is using Columns UI - not the default interface).



Is this the kind of thing you're after?

In Default UI you need to enable the Layout Editing Mode -- hopefully someone who knows more can help with proper instructions.
Anyone know if foosion's toolbar doesn't work for Default UI? 

I'm pretty sure what you want is very achievable.

C.

EDITED for clarity.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

How to search filenames only

Reply #11
Quick search seems to require a press of the enter key to submit a search
ie No real time updating of the search results as I type.

There's a dropdown menu on the magnifying glass icon. Toggle Autosearch to on.

C.
PC = TAK + LossyWAV  ::  Portable = Opus (130)

How to search filenames only

Reply #12
Top man...thanks for that.

I'm getting closer :-)

Geoff

How to search filenames only

Reply #13
Perhaps I was wrong on facets. I recalled similar functionality but it doesn't seem to be there.

As for integrating Quick Search, you should add a splitter first (vertical or horizontal - I can never remember which) then put the search panel inside that. That should stop the forced shrinking in your case. You should also use the same code already provided by carpman (%_filename%) in its settings so you will only search for what you want.

How to search filenames only

Reply #14
Daeron,

Thanks for the horizontal splitter tip....that works a treat.  I actually managed to suss that out myself :-)

Where, and how, in the Quicksearch preferences do I enter the %_filename% text so that it ONLY searches filenames?

Cheers

Geoff

How to search filenames only

Reply #15
Preferences/Media library/Quick Search:

How to search filenames only

Reply #16
Daeron

Thanks for your help.

I now have an excellent sound effects search facility using Quicksearch :-)

I'll look forward to adding a few more useful elements as I get more comfortable configuring Foobar.

What a great bit of software.

Cheers

Geoff