In Windows Explorer the preview pane is something I normally turn off to give me more screen space. There are times though when it can be really handy. For example when browsing through a large number of text files or images rather than opening each one individually.
So what do you do when you have an unusual file extension that doesn’t work with the preview pane?
A program I use creates a queue of files with an extension of “.cnm”. They are plain text files, but when you try to see them in the preview pane, you just get the “No Preview Available” message. This has actually bugged me for YEARS but for some reason I just kept finding other ways to deal with it.
So I had a moment today where I had hundreds of these files I want to flick through and I finally decided to figure this out once and for all.
SOLUTION
The first thing is to get it associated with a program that you know works with preview for the type of file this is. In this case we want Windows to consider a CNM file the same as a text file, so I’m going to set it up the same as a TXT extension
1. Open the file. Because Windows doesn’t recognise what type of file it is, it will ask what you want to open it with. Choose “Select a program from a list of installed programs”
2. Select Notepad (or whichever program is appropriate), and leave the “Always use the selected program…” box ticked
3. Open REGEDIT and browse to “Computer\HKEY_CLASSES_ROOT\[extension]”
(steps updated from suggestion by “Guest”)
4. On the right-hand pane, right-click and select new string value
5. Name the new key “PerceivedType” and set the value to “text”
6. Now go and check your file and the preview pane should now work to display the contents
Thank you!
thanks great help
It’s much easier than that – just add string value to the new extension PerceivedType and set it to ‘text’. Done.
Thanks, that’s actually a very good point. Not sure why I didn’t just do it that way in the first place.
Thanks! Very helpful when needing to open a file with one type of program, but preview it with another (like notepad to examine XML header info in notepad prior to opening with a default program).
You hero. I’ve been fighting this problem with .bad files dropped by our SMTP server. I knew it would be some kind of tweak to the extension handler and this works perfectly. This is going to make life a lot easier.
sometimes it’s the simple things…
Thank you soooo much! Used on Windows 10.
also make sure in
folder options
–view
—-always view icons never thumbnails
is unchecked
I’m not sure I see how that makes a difference to the file preview though?
Worded like a champ and easy too! Thanks from the bottom of my feet!
Meant to say “Worked like a champ…”, but come to think of it, the wording was pretty good.
Just as long as the bottom of your feet are clean at least 🙂
Awesome. Can I display a .png rather than show text?
.png is usually associated by default to display in preview. It uses “PerceivedType=image”.
If that doesn’t work then check you have an application installed to display png files
Actually, it can be even simpler than what’s presented above:
Just by using a simple .reg file, one can import the PerceivedType key into the registry in the right place in just a few clicks. Using this as a reference:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.ext]
“PerceivedType”=”text”
Saving it into a .reg file, and changing the .ext extension to the one you want to add, you simply need to double click on the file, agree to update the registry, and VOILA. It’s done.
Yup, that works as well and is good when you want to apply it on multiple machines or have a lot of them you want to change at once.
Thanks
Hi Scott,
I have installed Polaris Office (PO) in place of Microsoft Office (MO) and want to view all office files on the preview pane. *.doc, *.ppt, *.xls,*.docx, *.pptx, *.xlsx, etc,…
Can you please guide me what I have to out preview the files.
Unlike MO, for PO I can see only one option when for “Open with – Default Program”, i.e.Polaris Office. I don’t see Word, Excel, Powerpoint options separately.
Since I had installed Open Office earlier, the string values in Regedit for .docx (example) is
Default = OpenOffice.Docx
PerceivedType = document
What should I change it to to get the preview pane working?
I don’t know Polaris Office, so that might depend on PO having a preview filter available to do this.
The best approach might be to right-click a .doc file, “Open with”, “choose default program”. Select the Polaris Office exe and the “always open with” option. That will change the Default key, and if there is a preview filter available it might work.
If it works, then repeat for the other doc types, or you could probably just copy the reg key for the default that is set.
Thanks Scott, for keeping this alive. I’ve done a new build with LibreOffice 5 and windows 7, but I can’t preview my spreadsheets or documents. I have not installed MS Office. I can’t preview my xls or doc files, or even the ods or odt files. Very irritating. Can I infringe on your hospitality one more time? I’m afraid that I might need the same detail you’ve provided earlier, or perhaps more. Thank you very much.
Is there a way to change this without REGEDIT
The change needs to be made in the registry, but there are several ways that can be done.
You can create a .reg file of the changes and double click or execute from a script to “import”. You could also use powershell, vbscript or a command line tool like reg.exe
Late to the party – but thanks for the tip 🙂
I’d like to see someone figure this out for Windows 10 to enable previewing of ‘.eml’ files within explorer. This used to work by default if using Windows Live Mail but that’s been replaced by Windows 10 Mail app and the preview function has gone 😦
I found this solution offered, but I haven’t tried it myself – https://answers.microsoft.com/en-us/windows/forum/windows_10-files/previewing-eml-files-in-explore-windows-10-64-bit/18809b22-3f18-417e-9069-3f44b6a18aad
This is going into my goodie bag as the best tip of 2018. Thank you so much!
(even though it’s five years old)
Even five years and several Windows versions later, it has proven to be a timeless fix to a problem that persists. 😉
This helped me review a bunch of CNC g-code files quickly. Thank you!
thanks very much for this ! Had installed Softmaker Office last night – today no txt file previews. Softmaker Office had set that registry value to “document.” Per your instructions, I just set it to “text,” and now all is well. Great tip!
Worked great for .json manifest files. Also, how to set html preview type? As when you click on html file, it renders in preview as webpage, but in registry there is “PerceivedType=text”.
Are you asking how to have html preview, or are you saying it gives an html preview even though it is set to text?
I usually just fine another file type that already does what I want and copy the settings it has used.
The preview doesn’t work for all applications though, they need to have a preview extension registered, so in some cases it might depend on the browser you are using and if it supports preview.
For the first time in 30 years of PC experience, I just dared to and complete a hack of the Microsoft Windows registry which was introduced 27 years ago.
But before-hand I knew enough to also learn about restore points and their installation.
Thanks, Scott for your easy-to-follow “add a file that will be visible in the view pane” instructions. Not a touch down or home run but something far more permanent, a function to facilitate knowledge. Because of this multi-pronged success for the first time ever I got my 32 year old .max files to display in the view plane.
7 years later, and just finding this gem LOL, thank you.
Oh man – it is amazing what you find on the internet when you use the right search strings in Google! Thank you for this, it is EXACTLY what I needed. Made my day! 7 years after it was written – still works just fine.
[…] thanks to Scott Williams who wrote about this in a blog post in 2013 which I finally stumbled across in 2020 and it made my […]
Thanks
[…] .greenshot com o Handler nativo do Windows Explorer para a visualização de arquivos PNG. O Scott Williams escreveu em 2013 um artigo sobre como exibir o conteúdo de arquivos de texto com extensões […]
Still woking in windows 10 latest version!! thanks