Finding Folders that do not contain music files ?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
Flourgrader
Posts: 68
Joined: Fri May 28, 2021 7:55 am

Finding Folders that do not contain music files ?

Post by Flourgrader » Sat Jan 22, 2022 7:37 pm

Hi All,
This question applies to Everything 1.5 1296a(x64)
I am cleaning up 1000 music folders,
There will be nested folders to some depth on this project.
And I need to find folders that do not contain music.
I want to get them in a list so I can batch file delete them.
This is what I tried!
It did not work!
I tried it with filter audio and everything.. not sure if that would have made a difference?

F:\DATA\MUSIC\ !child:*.mp3 !child:*.flac !child:*.ape !child:*.m4a

Does anyone know what the string command is to achieve this
Thank You.

raccoon
Posts: 710
Joined: Thu Oct 18, 2018 1:24 am

Re: Finding Folders that do not contain music files ?

Post by raccoon » Sat Jan 22, 2022 9:33 pm

I think what you want is the following negated or-group syntax.

folder: !<child:*.mp3|child:*.flac|child:*.ape|child:*.m4a>

If you want to make sure the results are folders that contain at least one file in them, not just other folders, add this too.

childfilecount:>0

NotNull
Posts: 3721
Joined: Wed May 24, 2017 9:22 pm

Re: Finding Folders that do not contain music files ?

Post by NotNull » Sat Jan 22, 2022 9:45 pm

raccoon wrote:
Sat Jan 22, 2022 9:33 pm
I think what you want is the following negated or-group syntax.

folder: !<child:*.mp3|child:*.flac|child:*.ape|child:*.m4a>

If you want to make sure the results are folders that contain at least one file in them, not just other folders, add this too.

childfilecount:>0
Be careful with that!
It will also report folders that have deeper subfolders.
For example:
"c:\Band\Year - Album\" contains your music files and c:\band\ only contains folders. Now C:\Band will be reported too, which would delete all your music !!

Add childfoldercount:0 to your search

void
Developer
Posts: 9598
Joined: Fri Oct 16, 2009 11:31 pm

Re: Finding Folders that do not contain music files ?

Post by void » Sat Jan 22, 2022 11:00 pm

F:\DATA\MUSIC\ !descendant-file:<*.mp3|*.flac|*.ape|*.m4a>



descendant:

Flourgrader
Posts: 68
Joined: Fri May 28, 2021 7:55 am

Re: Finding Folders that do not contain music files ?

Post by Flourgrader » Sun Jan 23, 2022 11:58 am

Thank You, David,
your suggestion worked
perfectly, it was nice, simple and uncomplicated to execute.
raccoon & NotNull
Thank you, for your suggestions.
they where much appreciated.

Post Reply