Invert Result of File Type?

Things you’d like to miss in the future...
Post Reply
aimy
Posts: 181
Joined: 26 Feb 2007 15:44

Invert Result of File Type?

Post by aimy »

Hi all.

I'm using the latest XY 12.5.0000

Just now, I tried to search a pdf file among many mp3 files inside my pendrive. Coz it cause my player to stop when it reads the pdf.

So what i do is to leave the name field empty, looking for audio files and tick the invert check mark.

But to my surprise, XY yields no result although I know there's one pdf file inside the pendrive.

So, appreciate your comment.

Thank you.

j_c_hallgren
XY Blog Master
Posts: 5824
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Invert Result of File Type?

Post by j_c_hallgren »

Just curious -- if you know it's a PDF file, why not search for that suffix? Or do you kust know it's not a audio file?

Otherwise, the alternative is to just sort by file type and look for it that way...sometimes I do that as it's just a list resort and I can stay on same pane.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

aimy
Posts: 181
Joined: 26 Feb 2007 15:44

Re: Invert Result of File Type?

Post by aimy »

jc..

of course i know it's a pdf.. it's just that i just try to apply the same logic as the player does.. find those file that are not audio type, so by right XY should find the pdf file by inverting audio files searching rite?

or does pdf is considered as audio files as well? i believe it is not since I've already search the normal mode of audio files but no *.pdf is listed, only *.mp3.

Thank you.

aimy
Posts: 181
Joined: 26 Feb 2007 15:44

Re: Invert Result of File Type?

Post by aimy »

Furthermore, let's say the pendrive is really messed up with all types of files and i want to only keep those mp3 (audio files), how I'm gonna do that?

Thank you.

admin
Site Admin
Posts: 50425
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Invert Result of File Type?

Post by admin »

Not possible, the "Invert" applies to the Name pattern only.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

FluxTorpedoe
Posts: 773
Joined: 05 Oct 2011 13:15

Re: Invert Result of File Type?

Post by FluxTorpedoe »

Hi'
Type this in your address bar (didn't try with the search panel, I practically never use it):

?!mp3

or if you want your anti-search to be broader, e.g.

?:!(mp3 | m4a | wma)

It's a boolean (:) search that doesn't search (!) mp3, or m4a (|), etc.
You can exclude more filetypes by adding their extension, each separated by " | ".

Hope this helps.
Flux

aimy
Posts: 181
Joined: 26 Feb 2007 15:44

Re: Invert Result of File Type?

Post by aimy »

Thanks a lot flux, that's the way I want it.

It's not working with the search field but it does on the address bar as you mentioned.

It's just that it lists out folders as well. Anything else to overcome this?

Thanks.

admin
Site Admin
Posts: 50425
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Invert Result of File Type?

Post by admin »

Append a switch:

Code: Select all

?:!(mp3 | m4a | wma) /fr
f = files only
r = recursive
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

TheQwerty
Posts: 4353
Joined: 03 Aug 2007 22:30

Re: Invert Result of File Type?

Post by TheQwerty »

admin wrote:Append a switch:

Code: Select all

?:!(mp3 | m4a | wma) /fr
f = files only
r = recursive
Keep in mind that this search isn't restricted to just extensions. It will not find the file 'Snowman.txt' because it contains 'wma'. Since the pattern does not contain wildcards XY treats it as being surrounded by wildcards by default. To prevent this behavior you'll want to prepend each extension with '*.' - the period prevents it from possibly matching extensions that contain that extension ('Snowman.pwma').

Also, I'm not sure anything is gained here by using a boolean search. The following should work just as well:

Code: Select all

?!*.mp3;*.m4a;*.wma /fr

admin
Site Admin
Posts: 50425
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Invert Result of File Type?

Post by admin »

Yep, good point with the extensions.


Nothing is gained: internally both are converted to identical search tasks.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

Post Reply