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

FireWind

Свой
Регистрация
2 Дек 2005
Сообщения
1,957
Реакции
1,203
Credits
4,034
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”

image.jpeg

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.

image-1.png

Add the PerceivedType key for .dpr

image-2.png

and voila

image-3.png

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