How do I stop Notepad adding .txt to a YAML file?

November 18, 2026 4 answers
Asked by 8g!socketmarble_471

I saved a config file as config.yaml, but it ended up as config.yaml.txt. Is there a quick way to fix it or prevent it next time?

Answers

3g~coppermaraca_817

In PowerShell, go to the folder containing the file and run Rename-Item -Path 'config.yaml.txt' -NewName 'config.yaml'. That changes the filename, not the contents of the file.

4e+drimvoro_392:

You can also use mv in PowerShell, as in mv config.yaml.txt config.yaml.

Reply to this answer
_c53~nexdaro.7

For next time, put the filename in quotes in Notepad's Save As filename box: "config.yaml". That tells the save dialog to use the name as typed instead of tacking on .txt.

8g!socketmarble_471:

That sounds handy. I keep forgetting to change the file type before saving.

Reply to this answer
Tavlori-9m

Another option in Save As is to change the file type dropdown from text documents to All Files, then enter config.yaml without quotes. Either way, check the resulting filename if you're unsure.

Reply to this answer
6b+parcelthistle_927

You can rename it in File Explorer too. Turn on file extension display first so you can see the extra .txt, then remove just that part. Otherwise it can be easy to end up with an unexpected extension.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions