Primeira tentativa em lote trabalhando apenas na metade do caminho como findstr capitula sobre o grande número de extensões em documentos Kinds, música, imagem e vídeo.
EDITE a segunda versão de trabalho com um arquivo temporário (feio) contendo as extensões Kinds
:: Q:\Test18\SU_1341778.cmd
:: DirKind.cmd music x:\path\folder
@Echo off
:: Possible Kind_ type strings
Set "Kinds=calendar communication contact document email link music picture"
Set "Kinds=%Kinds% playlist program recordedtv searchfolder video"
Echo=%Kinds%|Findstr /i "%~1" 2>&1>Nul ||(Echo invalid Kind:%1 &TimeOut 5&Exit /B 1)
Set "TempFile=%temp%\Kind_%~1.ext"
:: Build Kind_ string enumerating extensions
Set "Key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\KindMap"
( For /f "tokens=1,3" %%A in (
'reg query "%Key%"^|find "%~1"'
) do Echo=%%A
) > "%TempFile%"
Echo Dir all files of Kind %1 in folder "%~2"
Call Set "Kind=%%Kind_%1%%"
For /f "delims=" %%A in (
'Dir /B /A-d "%~2\*" ^| Findstr /i /E /G:"%TempFile%" '
) Do Echo %%A
Exemplo de saída
> Q:\Test18\SU_1341778.cmd link "%USERPROFILE%\Desktop"
Dir all files of Kind link in folder "C:\Users\LotPings\Desktop"
Access 2016.lnk
ClassicStartMenu.exe - Verknüpfung.lnk
Excel 2016.lnk
FreeCommander XE.lnk
Microsoft Edge.lnk
OneNote 2016.lnk
Outlook 2016.lnk
PowerPoint 2016.lnk
Publisher 2016.lnk
shutdown.exe.lnk
UltraVNC Server.lnk
UltraVNC Settings.lnk
UltraVNC Viewer.lnk
WinDirStat.lnk
Windows 10-Update-Assistent.lnk
Word 2016.lnk