Created
June 29, 2020 13:58
-
-
Save olliencc/bd3995c510d5ed240ccd57883f607fe4 to your computer and use it in GitHub Desktop.
Show which program will load which extension when you double click in CSV format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM °²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²° | |
REM °² Enumerates all files extensions ²° | |
REM °² and what opens them on Windows 10 in batch/cmd ²° | |
REM °² twitter: @ollieatnccgroup ²° | |
REM °²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²° | |
for /f "tokens=1,2 delims==" %%G in ('assoc') do ( | |
for /f "tokens=1,2 delims==" %%I in ('ftype %%H 2^> nul') do ( | |
echo %COMPUTERNAME%,%%G,%%J | |
) | |
) |
@PolarBearGod - fixed in this version https://gist.github.com/olliencc/aef3e237b9d0455a235ed4c989532f05
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Slight issue with this batch script.
ftype
command is only aware of the following registry key:HKCR\htmlfile\shell\open\command\(Default)
Which means that the user's browser choice or other custom choices are not reported correctly.
It does not see:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\<extension>\UserChoice
Which can have a different application that the user might have selected.
Source: https://stackoverflow.com/questions/51715292/best-way-to-get-file-type-association-in-windows-10-from-command-line