TIP TIP: How to preview any text file in File Explorer

FireWind

Завсегдатай
Staff member
Moderator
How to preview any text file in File Explorer
Lars Fosdal
[SHOWTOGROUPS=4,20]
How to preview any text file in File Explorer
Lars Fosdal

The preview pane in the File Explorer will preview .txt files, but it will not by default allow you to preview .json, .pas, .dpr files and many other files, even if they really are text files.
Luckily, there is a simple remedy for this.


Locate the extension you want to view as text – f.x. .json

You will find it under
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.json
or
HKEY_CURRENT_USER\SOFTWARE\Classes\.json

Add a REG_SZ string named “PerceivedType” and give it the value “text”


This will instantly allow you to preview .json files in File Explorer. No restart needed, just click on the file name again.


Another example, is the Delphi .dpr files that do not preview.


Add the PerceivedType key for .dpr


and voila


Not rocket science, but kinda handy.
[/SHOWTOGROUPS]
 
Top