wondering how to see what paths contain no .wav files

General discussion related to "Everything".
Post Reply
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

wondering how to see what paths contain no .wav files

Post by frew »

Hello,

I'm wondering if there's a way to show
-only the folders on Drive C that
-have the least number of parent folders (ie folders as close as possible to the root drive)
-where the resulting folders have no .wav files in (edit: in them or in) any of their subfolders

The reason being that If I would like to the exclude those
"as close as possible to the root drive" folders
from the searches I do for .wav files.

And I'm just curious to see what paths contain no .wav files anywhere in their path.

I tried this:

C: folder: !child:*.wav parents:1

but it does not do it, because the resulting folders do have .wav in their subfolders,
although they do not have .wav in the folders themselves that were returned.

Again, my goal is to see all the folders on Drive C:, as close to the root drive as possible,
that do not contain any .wav files, and whose subfolders also do not contain
and .wav files.

Thanks for any help with this.

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

Re: wondering how to see what paths contain no .wav files

Post by void »

child: only works for files or folders in the immediate folder, it does not check subfolders.

You could try searching for *.wav and sorting by path.
Compare the paths in Everything against the root folders in Windows Explorer.
Paths that are missing in Everything means they do not contain a wav file.
NotNull
Posts: 5298
Joined: Wed May 24, 2017 9:22 pm

Re: wondering how to see what paths contain no .wav files

Post by NotNull »

Interesting question!
I Could not get it done with just an Everything query, but I think such a list can be created with a script.
Before spending time on that (I think such a script will not be straightforward): would that be of any help?
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

Re: wondering how to see what paths contain no .wav files

Post by frew »

Compare the paths in Everything against the root folders in Windows Explorer.
Thanks for the idea.

I'm checking that way a bit now.

So far, if I'm doing it as you suggest, it seems to be quite a bit of manual,
visual comparing of many paths, between the two programs, which I was trying to avoid.

Perhaps I'm not quite doing it as efficiently as you suggest?
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

Re: wondering how to see what paths contain no .wav files

Post by frew »

I Could not get it done with just an Everything query, but I think such a list can be created with a script.
Before spending time on that (I think such a script will not be straightforward): would that be of any help?
Well, actually, I've never worked with scripts in the way you may be referring to.
I didn't even know we could use scripts in Everything.

I would love to be able to simply generate a list of every single individual .wav on C:
I suppose at this point it's more of a curiosity, to see if it can be done on Windows 10.
I'm assuming Win7 and 10 are the same with regard to all these various search/results factors.

I work with music a lot, so I like to know exactly what sound files are on my computer.
It's a bit troubling that I cannot know for sure exactly what sound files are on this Windows 10.

Regarding the script, I mean it sounds interesting, and I would appreciate it, and it would be of
help to me, but it's not essential for my music workflow at this time. It's not needed,
but it would be fun and interesting to have a script that gets this type of task done.


Thanks.
NotNull
Posts: 5298
Joined: Wed May 24, 2017 9:22 pm

Re: wondering how to see what paths contain no .wav files

Post by NotNull »

You can get a(nother) list by using CMD:

Code: Select all

dir /s /b C:\*.wav > c:\MyFolder\MyWAVs.txt


The script that I "envisioned" (must be a better word for that ..) should work something like this:
* export from Everything a list of all folders containing WAV files as a TXT file (you got the Everything query covered already)
* export from Everything a list of all folders(query: folder: c: ) as text file.
* put these files in the same folder as the script
*run the script (probably .CMD or PowerShell script)

Result:
* A new textfile will be created with only "clean" folder trees. If the subfolders are clean too, they will not be reported.

Example (to check if I understood correctly what you meant):

c:\ no WAVs in rootfolder
c:\folder1 (+subs) is clean
c:\folder2\folderA contains WAV
c:\folder2\folderA\folderX is clean
c:\folder2\folderB is clean

Report:
c:\folder1
c:\folder2\folderB
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

Re: wondering how to see what paths contain no .wav files

Post by frew »

You can get a(nother) list by using CMD:
Sorry, this is all a bit over my head.
I'm trying it though.

So I created a folder:
C:\MyFolder

Then with Everything, I

-exported a list of all folders in C: that contain .wav
and put it here
C:\MyFolder\C_only_folders_with_wav.txt

-exported a list of all folders in C:
and put it here
C:\MyFolder\C_all_folders.txt

-then I created a .txt file into which I put your code
dir /s /b C:\*.wav > c:\MyFolder\MyWAVs.txt

and named it
edit: C:\MyFolder\script_1.cmd

-clicked on the script file and let it run

-checked the
MyWAVs.txt

and noticed a huge listing of .wav files
with their full paths...looks like perhaps every .wav
on C: because around 9000 lines of text.

Well, some interesting new territory for me.

I think I may be doing something wrong though because the resulting
MyWAVs.txt shows .wav (and their full paths)files rather than
the result I'm looking for, which is
a listing of folders nearest the root drive that do not contain any .wav anywhere in their full path.

Thanks for the script, but I don't know if I'm using it right.

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

Re: wondering how to see what paths contain no .wav files

Post by NotNull »

Sorry for the confusion. The message consisted of 3 parts:
1. An alternative to get a textfile with all your WAV files
2. How the script (still to be written) should do it's job
3. A check if what I think that script should report corresponds with what you would like to see.

First part:
The "MyFolder" part was meant to be a placeholder for any folder on your system where you want to put the file containing the names of all your WAV files. Could be any (existing) folder.
You already executed the command, so now you have a MyWAVs.txt with a list of what should be all of your WAV's on the C: drive

Second part:
The exports are needed for the script to create the "clean folder" list You already created them (which is good). Now those exports have to wait until the script is finished. No worries, the script will be startable from Explorer. Just double click, no difficult stuff ...

Thiird part:
Before I start building this script, I would like to know the output you would like to see. Is this what you would expect? :
Example (to check if I understood correctly what you meant):

c:\ no WAVs in rootfolder
c:\folder1 (+subs) is clean
c:\folder2\folderA contains WAV
c:\folder2\folderA\folderX is clean
c:\folder2\folderB is clean

Report:
c:\folder1
c:\folder2\folderB
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

Re: wondering how to see what paths contain no .wav files

Post by frew »

Sorry for the confusion. The message consisted of 3 parts:
1. An alternative to get a textfile with all your WAV files
2. How the script (still to be written) should do it's job
3. A check if what I think that script should report corresponds with what you would like to see.
No problem. I'm new to most of what you are referring to, so my descriptions, etc.
are likely to be a bit beginner-ish, etc.

Ah, I think I see what you are doing now.

Yes, that's the report that'd I'd like.

I think you also meant to put this line form your example into the report example too:
c:\folder2\folderA\folderX is clean

And by clean in these examples I'm sure you mean no .wav to be found anywhere further down the paths.

Thanks, I look forward to seeing your script produce these results.

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

Re: wondering how to see what paths contain no .wav files

Post by NotNull »

Started to work on said script as most "components" had to be build anyway, so here is a first version.

How to:
  • Unzip CLEAN.CMD from the .zip to the folder where your export files are.
  • Check the filenames in the script under the SETTINGS section and change when needed.
    Currently:
    set WAV_FOLDERS=C_only_folders_with_wav.txt
    set ALL_FOLDERS=C_all_folders.txt
    set CLEAN_FOLDERS=C_rootfolders_without_WAV.txt
    set SHORT_WAV=C_rootfolders_with_WAV.txt
  • Start CLEAN.cmd in Explorer
  • Let the script do it's work
  • Check the two output files.
That's it.

Please let me know if this is what you meant with "wondering how to see what paths contain no .wav files"


Remark:
Foldersnames taht *start* with a some special characters (like _ or $), will not be processed. From those folders the rootfolder can not be detected. So, you will see (example) C:\$Recycle.bin *and* it's subfolders, instead of just C:\$Recycle.bin.

That can be fixed (no big deal), but not today!
Besides: most people don't even have these folders on their systems (apart form $Recycle.bin). Chances are this version will do just fine for you.
Attachments
clean.zip
(942 Bytes) Downloaded 298 times
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

Re: wondering how to see what paths contain no .wav files

Post by frew »

Please let me know if this is what you meant with "wondering how to see what paths contain no .wav files"
Yes, this is exactly what I meant.

Thanks for the script.

I hate to complicate things, because I can see that for the most part, all the paths in
C_rootfolders_without_WAV.txt
do not contain any .wav files.

Yet I see in this
C_rootfolders_without_WAV.txt
the path
C:\Documents and Settings
and when I open a Windows folder and put in the path
C:\Documents and Settings
then do a search for *.wav (or .wav, or type:wav)
I see lots of .wav files show up.

So technically
C:\Documents and Settings
should not be showing up in
C_rootfolders_without_WAV.txt

...I think....

But this gets me much closer.

I'm a little concerned though because I was hoping to gather some of the lines of text from
C_rootfolders_without_WAV.txt
and pop them into some exclude fields.

Oh well, Windows and all the junction stuff I guess, getting in the way of just
simply showing only all the separte individual .wav files on my computer.

Thanks again though, because this gives me something to work with.

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

Re: wondering how to see what paths contain no .wav files

Post by NotNull »

"C:\Documents and Settings" is one of those "shortcuts".
The actual files from that are in C:\USERS and C:\PROGRAMDATA.

Search in C:\USERS and you will find the same WAV files as in "C:\Documents and Settings"....
In my "definition" files in "C:\Documents and Settings" shouldn't be counted (although not everyone / every tool thinks the same about that, as mentioned before)

This "C:\Documents and Settings" is only included (as a "shortcut") in modern OS's so that older programs, (badly) written for WinXP don't fail. You shouldn't use it anymore.
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

Re: wondering how to see what paths contain no .wav files

Post by frew »

You shouldn't use it anymore.
I actually do not know how to not use it.

Note that Everything just showed C: has 8855 .wav files in both of these cases:

C:\Documents and Settings

1. in the exclude list
2. not in the exclude list

...interesting.

both these simple tests done with
Match whole filenames when using wildcards checked.

Thanks for the ideas.
And I do thank you very much indeed for that really cool script.
I'll find some uses for it and let you know.

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

Re: wondering how to see what paths contain no .wav files

Post by NotNull »

Now I get it ... I misread your post.

The script does "just" a compare of the "all folders" list and the "has wav-folder" list.
As "Documents and settings" was reported in the "all folders" list, it will be included.

Maybe Everything has an option to exclude junctions (didn't check)?
NotNull
Posts: 5298
Joined: Wed May 24, 2017 9:22 pm

Re: wondering how to see what paths contain no .wav files

Post by NotNull »

frew wrote:
I'm a little concerned though because I was hoping to gather some of the lines of text from
C_rootfolders_without_WAV.txt
and pop them into some exclude fields.
An alternative to create these exclude fields:
* Create a textfile with the folders you want to exclude (make a copy of the output file and edit this to your liking).
* save this in the same folder:

2INI.CMD

Code: Select all

@echo off
setlocal enabledelayedexpansion
set OUT=
for /f "usebackq delims=" %%X in ("%1") DO (
    set abc=%%X
    set abc=!abc:\=\\!
    set OUT=!OUT!"!abc!",
)
echo %OUT%>"%~dpn1.INI"
* Drag/drop your texttfile to 2INI.CMD

It will create an INI file with the same name as the file you dragged (TEST.txt gives you TEST.ini). It's contents look like this:

Code: Select all

"C:\\2INSTALL","C:\\Temp","C:\\Tools",            (with your paths, of course :-) )
That is the syntax used in the Everything.ini

* Stop Everything
* Open Everything.ini in an editor
* Search for "exclude_folders="
* Paste the line with folernames from the previously created INI
* Save
* Start Everything.
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

Re: wondering how to see what paths contain no .wav files

Post by frew »

An alternative to create these exclude fields:
* Create a textfile with the folders you want to exclude (make a copy of the output file and edit this to your liking).

Okay, this may take me a while to catch up with trying this script.
First time I've used these kinds of scripts.
The only thing I've done with scripts so far is basically using
AutoIt3 to create scripts to automate some repetitive tasks,
and to produce some experimental algorithmic types of music ideas.

Still I wonder, back to my basic question...
Okay, I've got this computer, and I know it has a bunch of .wav files on it:

What may be the best way, given that it's Windows 10, to
definitively show me every single separate .wav file on my computer?

As it is now, I'm just not sure how to get that information precisely,
largely I'm thinking now because of all the Junctions stuff on Windows 10
that may be causing various sort of "twice found" .wav on C:

Or for that matter perhaps "thrice found", or more?

Just out of curiosity now, I wonder how the built in
Windows 10 Windows Search service indexes all the
.wav on my computer? I wonder if I can trust that to show
me what's really going on with regards to showing me all the
separate individual .wav on my computer, ie without showing me
any of the "twice founds", etc.

This curious situation arose because, having just switched to
Windows 10 form XP, I noticed that the various tools I was using
on XP that gave me consistent search results returns from a simple search
for all .wav on C: now began ( on Win10) to show various results
amongst themselves with that same simple search for all .wav on C:

Thanks again for the latest script, I'll give it a try
and let you know how it goes.

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

Re: wondering how to see what paths contain no .wav files

Post by NotNull »

frew wrote: Okay, this may take me a while to catch up with trying this script.
First time I've used these kinds of scripts.
Just save the text in 2INI.CMD and drag/drop the NO WAV's output file to that script.
Still I wonder, back to my basic question...
This is getting confusing; please keep questions in their own topic/thread (you already created a thread for that question)
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

Re: wondering how to see what paths contain no .wav files

Post by frew »

This is getting confusing; please keep questions in their own topic/thread (you already created a thread for that question)
Whoops...sorry for the confusion.
Your right, the other thread is the place to revisit that question.
I'll see if I can get to that script today, thanks for it.

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

Re: wondering how to see what paths contain no .wav files

Post by NotNull »

NotNull wrote: The script does "just" a compare of the "all folders" list and the "has wav-folder" list.
As "Documents and settings" was reported in the "all folders" list, it will be included.

Maybe Everything has an option to exclude junctions (didn't check)?
It has! (sort of ...)

Under Options > Indexes > Exclude you can: "Exclude system files and folder".
This will remove all the junctions. Plus some other system files and folder, but those don't contain your WAV files as they are, well, SYSTEM files :-)

With this setting you can create a new "all_folders" list and run the sctript again to get a new "rootfolders without WAV" list. This time without the junctions....
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

Re: wondering how to see what paths contain no .wav files

Post by frew »

An alternative to create these exclude fields:
Okay, I see what this does.
Right, okay, it makes the job of putting in a bunch of exclude folders
very quick and easy. Wow, that's pretty cool. Thanks.
Under Options > Indexes > Exclude you can: "Exclude system files and folder".
This will remove all the junctions. Plus some other system files and folder,
Nice, hadn't thought that may exclude junctions, etc.

Here's some various numbers of .wav results by searching
C: *.wav
with these various settings in Everything:

8863 exclude nothing
8863 exclude Documents and Settings folder/path only
8529 exclude system folders only
8390 exclude hidden only
8056 exclude system and hidden only
8056 exclude system and hidden and Documents and Settings folder/path

I'm not really sure what those numbers tell me.

Well, I may just take a break from trying to figure all this out.

Even with all the experimenting it seems I'm never really sure
what paths contain no .wav files.

I'm even starting to wonder what a path is in Windows 10.

Maybe some sort of graphic representation of the whole file system would be nice.

I've tried WinDirStat.

Thanks,

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

Re: wondering how to see what paths contain no .wav files

Post by NotNull »

After WinXP, WIndows got a lot more complicated. A lot of functiuonality is hidden behind a few (management) layers.

This is done partly because of security: older Windows versions had direct access to system functions, which was a perfect attack vector for all kinds of malware. And this (direct system access) was also the root cause of a lot of crashes. Now a program has to talk to "layer 1", which only communicates predefined messages to "layer 2" (and there is likely also a "layer 3"), so less chances for hacking / crashes.

Another reason is complexity of the operating system. Like any company or other organisation: if it grows, you get departments which are responsible for certain tasks. In a small company you do administration, fill the printer, water the plants, etc. In larger organisations you just have have to trust that the departments do their jobs ....

And another factor is backwarsd compatibility: Windows keeps supporting older versions of programs. For most companies that is a good thing, but it also means that Microsoft must be getting creative in ways to support these basically unsupported programs/functions.
That is where all these junctions come from. (beside the fact that you want functionality like this in a modern operating system).

I had a hard time accepting that I was a lot less in control of Windows functionality (when you try hard, you can get it back partially) than I used to be. I just had to "Let it go"



Long story short, back to your original question: "wondering how to see what paths contain no .wav files".
My best bet is following these steps:
  • Keep it simple. Let it go. Just do and don't ask why Windows does stuff.
  • Everything: Exclude system files. Just the system files. No hidden files
  • Generate a report of all folders on your system
  • Generate a report of all folders containg WAV's on your system.
  • Feed these two files to the CLEAN script
  • The generated output file contains all rootfolders without WAV's
  • If you want those rootfolders in the Exclude list of Everything, feed the rootfolders file to 2INI.cmd and edit Everything.INI with the results of that.


  • I can't offer you more than this. Maybe someone else can....
frew
Posts: 45
Joined: Tue Apr 28, 2015 2:16 am

Re: wondering how to see what paths contain no .wav files

Post by frew »

I can't offer you more than this.
You know, I think you summed it up for me brilliantly.
All things considered, I take your advice and I'll roll with that.
I do greatly appreciate all your help, views and insights,
and of course the scripts.
Feeling much better about it all now, with some perspective.

Thanks again,

frew
Post Reply