How to make windows explorer preview scripts and other text files

answer

As an IT admin, you may often find yourself in need of knowing how to make Windows Explorer preview scripts and other text files. While this feature is not natively available in Windows, there are a few ways that you can make it work.

The first method is to use a third-party tool. There are a few free and paid options available that will allow you to preview text files in Windows Explorer. Some of them include Notepad2, Notepad++, and TextPad. To use these tools, you will need to install them, and then configure your Windows Explorer settings to use them for previewing text files.

The second method is to use Windows PowerShell. Windows PowerShell is a command-line shell and scripting language that is included in Windows. With PowerShell, you can create a script that will allow you to preview text files in Windows Explorer. To do this, you will need to create a script that uses the Get-Content cmdlet to read the contents of the text file, and then use the Out-Null cmdlet to display the contents in a Windows Explorer window.

The third method is to use a text editor. A text editor is an application that is designed for editing text files. Examples include Notepad, Notepad++, and Sublime Text. With a text editor, you can open a text file and then press the “Preview” button to view the contents of the file in a separate window.

Finally, you can also use the Windows Registry to enable the preview feature for text files. To do this, you will need to open the Windows Registry Editor (regedit.exe) and navigate to the following key:

HKEY_CLASSES_ROOT\\SystemFileAssociations\\text\\shell\\open\\command

Once you have opened the key, you will need to modify the value for the “(Default)” entry. The value should be the path of the application that you want to use for previewing text files. For example, if you are using Notepad++, you would set the value to:

\C:\\Program Files (x86)\\Notepad++

pp.exe\ \%1\

Once you have set the value, you can close the Registry Editor and the preview feature will be enabled for text files in Windows Explorer.

In conclusion, there are a few different ways that you can make Windows Explorer preview scripts and other text files. You can use a third-party tool, Windows PowerShell, a text editor, or the Windows Registry. Whatever method you choose, it is important to remember to always back up your system before making any changes.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo