How to Display and Modify File Extensions in Windows10

While using Windows, you may encounter a situation where two files are both images, but their types are different. This is primarily distinguished by their file extensions, but by default, the extensions may not be visible. So, how can we display these file extensions?

Another scenario is when we create a text document, input some commands, and want to convert it into a batch file (.bat) so that it can run. However, modifying the file extension might seem challenging. In this article, we’ll explain how to display and modify file extensions in Windows.

1. How to Display File Extensions.

  1. Open Windows File Explorer.
  2. Click on the “View” tab at the top.
  3. Select “Options.”
  4. Go to the “View” tab.
  5. Scroll down and find the “Hide extensions for known file types” option.
  6. Uncheck this option.
  7. Click “Apply” and confirm.
  8. After these steps, all file extensions will be displayed. For example, the first image file will have the .jpg extension, and the second image will have the .png extension.

2. How to Modify File Extensions.

  1. If you have a TXT document and want to convert it to a batch file (.bat), simply rename the extension to .bat. Here’s how:
  2. Right-click the text file and select “Rename“.
  3. Change the extension from .txt to .bat.
  4. Windows will warn that changing the extension may cause the file to become unusable—click “OK” to proceed.

3. Running the Batch File.

  1. After changing the extension, right-click the file and select “Edit“.
  2. You can input a command like `pause`, which prevents the command window from closing quickly.
  3. Below is the full content of the BAT file.
    echo 'hello world'
    
    pause
  4. After saving, double-click the file to run it, showing “hello world” and pressing any key will close the window.
  5. These simple steps will help you easily display and modify file extensions in Windows, enabling files to run in the format you want.

4. Video.

You can watch the following demo video by choosing your preferred subtitle language.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.