Claudio Salvio wrote: ↑Fri Jul 23, 2021 6:23 pm
Because of this, I assume it was incorporated in version 1.5.
Correct!
On the computer where I did the test it returned about 7760 extensions.
In some use cases, I need to curate the list.
Note that Everything finds all file extensions on all drives indexed. Your Powershell script will find only extensions in the starting folder and beyond. You could add a path to your search query/queries to limit the search to only that folder (and below)
Something I overlooked is that in those cases the number of files each extension has is useful for filtering them out from the list.
ExtFrequency.ps1
Code: Select all
es.exe file: !ext: distinct: sort:extension -ext -export-csv .\exts.csv
import-csv .\exts.csv -Encoding utf8 | select Extension, @{name='Frequency';expression={[int](es.exe ext:"""$($_.Extension)""" -getresultcount) }}
Output:
Code: Select all
Extension Frequency
--------- ---------
0 82
0, Culture=neutral, PublicKeyToken=adb9793829ddae60 16
0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 1
0-2f9188b68640dbf72295f9083a21d674a314721ef06f82db281cbcb052ff8ec1 1
0-beta1 1
0-custom3 1
0-preview1 1
0-preview20210318001 1
000 2
001 3
002 3
003 3
004 2
01 1
1 15
1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 1
[...]
You can save the reslts to file with Export-Csv, Out-File, etc.
This PowerShell code is only briefly tested, so please test carefully before going into production with it.
It requires
ES.exe, the command-line tool to extract information from a running Everything.
For ES.exe to work with the alpha version of Everything 1.5, you need to create an ES.ini in the same fodler with the following content:
ES.INI
Note:
Will probably be faster than youroriginal PowerShell command, but still has to fire 7760 queries at Everything to get the frequency for each extension.