What's the history behind using file extensions to indicate the type of a file?

In summary: What's the history of using extensions of file names (such as *.c, *.for, *.bmp etc) to indicate the general type of a file?My hazy memory of working on ancient mainframe computers is that a file name extensions were not mandatory for most software. For example, if you wanted to compile a Fortran program, you didn't have to end the name of the source file with ".FOR". People did use file name extensions as reminders to themselves, but these were a matter of personal preference. When ms-DOS, arrived, the associated software did expect files to have particular extensions. For example, a BMP file has information about itself in a
  • #1
Stephen Tashi
Science Advisor
7,861
1,598
What's the history of using extensions of file names (such as *.c, *.for, *.bmp etc) to indicate the general type of a file?

My hazy memory of working on ancient mainframe computers is that a file name extensions were not mandatory for most software. For example, if you wanted to compile a Fortran program, you didn't have to end the name of the source file with ".FOR". People did use file name extensions as reminders to themselves, but these were a matter of personal preference.

When ms-DOS, arrived, the associated software did expect files to have particular extensions. For example, a BMP file has information about itself in a specified header within the file, so in principle a program could examine the contents of a file named "WALDO" and determine if it was a BMP image file instead of expecting the file name to be "WALDO.BMP". However, most software was lazy in that respect and required the extenson on the file name to indicate the file's type.
 
  • Like
Likes roam and Wrichik Basu
Computer science news on Phys.org
  • #2
That's an excellent question. First, we didn't have files, we had decks or tapes. Then we had files but they didn't have names (search for 4 EOF marks on the tape). Then they had names, then they had names with extensions.

The earliest I can remember was Unix in 1977 had file extensions. That long predates the PC or the Apple ][ or MS-DOS.
 
  • #3
anorlunda said:
The earliest I can remember was Unix in 1977 had file extensions. That long predates the PC or the Apple ][ or MS-DOS.
Not so long, depending on how long "long" is.
Apple ]['s were around in '77, and the IBM PC dates to '81. I don't believe that the Apple computers used file extensions, at least not before ProDOS (if then), but the PCs certainly used file extensions from the get-go, I believe.
 
  • #4
I also remembered that the DEC machine also had file extensions. PDP-11 date? DEC 20 date? Also Multics going back to the 1960s.

Edit: Also the HP2100 circa 1973 had file extensions. As did the Prime 300 in 1974. The VAX in 77. Data General, Interdata, Modcomp, Xerox, there were many systems with file extensions in the 70s.

Edit: The Apple ][ in 77 yes, but it did not have files until the year ?? when it got floppy disks too. I bought my Apple ][ Plus model in June 1979. It had floppies from the first, if I remember right.
 
Last edited:
  • Like
Likes Klystron and Nik_2213
  • #5
IBM's MVS/TSO did something similar in 1971.
 
  • #7
Stephen Tashi said:
What's the history of using extensions of file names (such as *.c, *.for, *.bmp etc) to indicate the general type of a file?

My hazy memory of working on ancient mainframe computers is that a file name extensions were not mandatory for most software. For example, if you wanted to compile a Fortran program, you didn't have to end the name of the source file with ".FOR". People did use file name extensions as reminders to themselves, but these were a matter of personal preference.

When ms-DOS, arrived, the associated software did expect files to have particular extensions. For example, a BMP file has information about itself in a specified header within the file, so in principle a program could examine the contents of a file named "WALDO" and determine if it was a BMP image file instead of expecting the file name to be "WALDO.BMP". However, most software was lazy in that respect and required the extenson on the file name to indicate the file's type.
Vanadium 50 said:
IBM's MVS/TSO did something similar in 1971.
It still does. These days it's called z/OS TSO/E. The EDIT (line editor) command in TSO (Time Sharing Option) uses the final qualifier of a dataset name as a dataset type to set defaults for record format, block size, and logical record length. Most other programs ignore the content of dataset names. MVS still limits dataset name length to 44 characters.
 
  • #8
Stephen Tashi said:
What's the history of using extensions of file names (such as *.c, *.for, *.bmp etc) to indicate the general type of a file?
The article linked to by @256bits has a link to this 8.3 filename format article.
 
  • #9
DEC PDP-11's (not sure about the PDP-8) and VAX computers in early 1980's used file extensions. IIRC the C interpreter expected .c and produced .o object files expected by the compiler. My first use of FORTRAN in late 1970's complied according to directives coded on the first punch card (usually colored green) in job control language (JCL). The IBM mainframes included .for and.obj file extensions but do not know if they were required. Probably depended on the program or script.

[Edit: removed .exe from JCL list. Used later.]
 
Last edited:
  • #10
Klystron said:
My first use of FORTRAN in late 1970's complied according to directives coded on the first punch card (usually colored green) in job control language (JCL). The IBM mainframes included .for,.obj, and .exe file extensions but do not know if they were required. Probably depended on the program or script.
The compiler or assembler can generate a dataset name ending in .OBJ for the object module. I've never seen .EXE in an IBM mainframe dataset name. It wouldn't be invalid, but it also wouldn't have its special meaning there. Maybe you remembered the JCL EXEC statement.
 
Last edited:
  • Like
Likes Klystron
  • #11
Klystron said:
(not sure about the PDP-8

OS/8 had two letter extensions.
 

1. What is the purpose of file extensions?

File extensions are used to identify the type of file and the program that is needed to open it. They also help to organize and categorize files, making it easier to find and access them.

2. How were file extensions created?

File extensions were first created by computer operating systems as a way to differentiate between different types of files. As technology advanced and more types of files were created, standardized file extensions were developed to help identify and open these files.

3. Can file extensions be changed?

Yes, file extensions can be changed. However, changing a file extension may cause the file to become unreadable or corrupt if it is opened in the wrong program. It is important to only change file extensions if you know what you are doing and have a specific reason for doing so.

4. Are file extensions universal?

No, file extensions are not universal. Different operating systems and programs may use different file extensions for the same type of file. It is important to know which program created a file in order to determine its file extension.

5. What is the most common file extension?

The most common file extension is .docx, which is used for Microsoft Word documents. Other common file extensions include .jpg for images, .mp3 for audio files, and .pdf for documents.

Similar threads

  • Programming and Computer Science
2
Replies
65
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
4K
Replies
10
Views
2K
Replies
13
Views
2K
  • Sci-Fi Writing and World Building
Replies
21
Views
851
  • Programming and Computer Science
Replies
15
Views
974
  • STEM Academic Advising
Replies
13
Views
2K
  • Art, Music, History, and Linguistics
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • General Discussion
Replies
12
Views
5K
Back
Top