Working with filesFrom the window to the file · 6 min read

The extension

A file name has two parts separated by a dot. In proposal.md, proposal is the name and .md is the extension.

The important part, and the one almost nobody is clear on: inside, the same bits are there, with or without the label.

So what is it for? For one thing, and it is a big one: picking the interpreter.

When you double-click an .xlsx, Windows does not open the file and check what it is: it looks at the four letters at the end, finds them in a list of its own that says "xlsx → Excel", and launches Excel. Double-click a .pdf and that same list says "pdf → the PDF reader". Nothing more than that.

Inside both files there is exactly this:

Acme,1200,2026-03-14

The label says "table" → commas separate columns

Acme12002026-03-14

Reads as tabla de tres columnas.

The bits did not change. What changed is who reads them, and with what instructions.

And the AI does exactly the same, but to decide how to read the characters inside.

If the file ends in .csv, it knows commas separate columns. If it ends in .md, it knows a # is a heading. If it ends in .html, it knows <p> opens a paragraph. The same characters, read three different ways depending on the label.

That is why you ask it to "save it as csv" and not "save it as a table": the label is the instruction.

Since the extension is what gives the orders, it helps to see it. Windows hides them by default, which is why a lot of people live with files whose type they cannot see.

In File Explorer: View → Show → File name extensions. On Windows 10, the View tab and the checkbox of the same name.

Turn it on today and never turn it off.

Careful: two different things are called "extension".

A VS Code extension is an add-on you install to give the window one more function. A file extension is the letters after the dot.

They have nothing to do with each other: they share a name and that is it. When there is any risk of confusion, say the whole thing.

What happens if you change a file's extension?

The extension is not what the file is. It is the label saying what it is supposed to be.

snack 6 of 9 · Converting is not renaming

Powered by KlugerByte