2

I have this weird question. If I dont specify a file extension (when File Extensions are shown) for a file in windows 10, they like... delete their extensions and are now of type "File". What extension actually are these?

Chris Rogers
  • 1,480
  • 1
  • 11
  • 28
  • 2
    A separate but related topic: [How to set the default program for opening files without an extension in Windows?](https://superuser.com/q/13653/650163) – Run5k Jun 14 '18 at 18:57
  • 1
    Why are you assuming file names _must_ have an extension? That hasn't been true on Windows since 1995. – u1686_grawity Jun 15 '18 at 04:31
  • it's a file without the proper extension. – Mastaxx Jun 15 '18 at 09:09
  • Well, how does the program store data into a file if it doesn't have an extension? –  Jun 19 '18 at 23:54
  • Coincidentally enough, earlier today the staff at How-To Geek published an excellent article that should help clarify things for you: [What Is A File Extension?](https://www.howtogeek.com/356448/what-is-a-file-extension/) – Run5k Jun 21 '18 at 04:07
  • @ZeekPlayz: Extensions have nothing to do with storage. They're just part of the name. They don't dictate the file's format, only give the OS a hint as to what format it _might_ be. – u1686_grawity Jun 23 '18 at 13:31

2 Answers2

2

They don't actually have an extension (since you didn't specify one), and as a result they can't be directly associated with a program to open them. Because of this, the File Explorer interface will simply display them with a generic File label under the Type column:

Blank File Extension


This can occasionally happen when someone accidentally deletes the extension of a certain file, and the following article explains this scenario a bit more in-depth:

How to Handle Files With No Extension

What about files with no extension?

Unlike the Macintosh which embeds creator information into files so they can have just about any name, a PC still mostly uses file extensions to associate programs with files. But, what do you do with a file that has no extension? The simple answer is: punt.

With no extension there can be no direct association. So, you have to know exactly what the file's format is. You can only know this by either looking into the file and trying to figure it out or, easier, sending a note to the person who sent you the file asking what program created it and what format it's in. With that information you can determine if you can open the file or ask to have it re-sent in a format you can open.

Sources:
What Is A File Extension?
How to Handle Files With No Extension


Needless to say, if you already know what type of file it is you can add or replace the appropriate extension to restore the file's functionality.

Run5k
  • 15,723
  • 24
  • 49
  • 63
  • Note that all files have the data as to file type embedded in them. Just all the other operating systems EXCEPT Windows read that info to determine what to do with a file - Windows depends on the file extension. – ivanivan Jun 14 '18 at 19:48
  • 1
    @ivanivan - there are many file types that have ZERO info about their "type" embedded in them. All the Linux versions I've used do indeed have a facility that attempts to identify file types by looking at the file contents, but it frequently fails miserably. I always have thousand and thousands of mislabeled files, which IMO is worse than no type label at all. – kreemoweet Jun 15 '18 at 03:34
  • @kreemoweet You must either have a bunch of unusual files, or a really old version of the `file` command and/or the mime types database. For widely used formats, the standard matching mechanisms are extremely reliable these days. – Austin Hemmelgarn Jun 15 '18 at 18:32
1

Such a file does not have a file extension. It is just the Explorer which shows "file" in detail view. For a folder (which has also no extension) there is shown "File folder".

You also could name a file "test.examplefileextension" then the Explorer will show "EXAMPLEFILEEXTENSION".

chloesoe
  • 716
  • 3
  • 10