00 Votes

Windows: I can not change the extension of a file

Question by Guest | 2018-03-25 at 21:15

I would like to create a batch script on Windows with the file extension BAT. For this, I first created a simple text file (TXT), whose extension I then wanted to change from TXT to BAT.

However, this fails. Apart from the fact that even the TXT extension is not displayed properly, Windows always changes the file in something like script.bat.txt when renaming - so the file remains a text file. What can I do?

1Best Answer1 Vote

Presumably you have enabled the option "hide extensions for known file types" in your Windows.

As a result, the TXT extension is hidden and when renaming, you only edit the name before the file extension TXT, so that you can not get to the actual extension anymore.

Follow the instructions here to display the file extensions again. Then it should work with the rename.
2018-03-26 at 10:22

ReplyPositive Negative

Related Topics

Rename File to its Folder Name

Tutorial | 0 Comments

PHP: File Download Script

Tutorial | 0 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.


Ask your own question or write your own article on askingbox.com. That’s how it’s done.