By default, the preview capability exists for most text-based files in File Explorer. However, for some file types, such as .log or .py, a preview may not be generated by default and you see the message “No preview available” in the preview pane in File Explorer.
You can enable preview of such files (.log and .py) in the preview pane using a registry edit.
Resolution
To enable the preview of .log files in the Explorer preview pane, please open Command Prompt (admin) and run the following command:
reg add "HKEY_CLASSES_ROOT\.log" /v "PerceivedType" /d "text" /f
Likewise, you can enable text previews for .py file type using the following command:
reg add "HKEY_CLASSES_ROOT\.py" /v "PerceivedType" /d "text" /f
Close all File Explorer windows. If the changes don’t take effect immediately, log off and log back in to your account.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!