Common file extensions.

File names consist of two parts, the file name and the file extension, separated by a full stop. The Operating System (“OS”) associates each file extension with an application. When a user opens a file, the OS opens the associated application and then the app opens the file.

In this post:

  1. Naming conventions
    1. Forbidden characters
    2. Length
  2. Extensions
    1. Setting defaults
  3. Problems

1. Naming conventions

1.1 Certain characters are forbidden:

  • < (less than)
  • > (greater than)
  • : (colon)
  • " (double quote)
  • / (forward slash)
  • \ (backslash)
  • | (vertical bar or pipe)
  • ? (question mark)
  • * (asterisk) [1]

In earlier years, different operating systems had different naming conventions. As a result, you will still frequently see users using these old naming conventions out of habit, for example: using an underscore to replace spaces in file names.

1.2 The length of the name is limited

A standard Windows 10 set-up will allow files names of up to 255 characters. It is possible to change this so that longer filenames are possible, but it is highly unlikely and not advisable to use such lengthy filenames as you will often run into compatibility issues. [2]

2. Extensions

Windows filenames include a 3 or 4 letter extension. The extension is always separated from the name by a full stop. By default, Windows Explorer does NOT display file extensions — this is to prevent the average person from mistakenly removing the extension when renaming the file. As a CAT learner, you should always change the folder view to display file extensions!

Removing the file extension does not affect the file in any way. The file can still be reopened with the appropriate app, or the extension can simply be re-added to the file name.

Removing the extension of a filename.Opening a file that has no file extension.
  1. A Word document (note the Word icon)
  2. Renaming the document leaving the extension out
  3. Dialog warning of the consequences of having no file extension
  4. Confirm your choice
  5. File with no extension (note the icon is now blank)
  6. Option menu when opening file that has no extension (note that Word 2016 is in the list)
  7. Search for other Apps not in the list of suggestions
  8. Confirm choice with OK button

2.1 Setting defaults

Many files can be opened by multiple apps. You can set the default app by associating file extensions with apps in the OS Settings. In the example below I am associating files with the .html extension with Google Chrome:

Choosing default applications by file type in Windows 10.
Choosing default applications by file type in Windows 10.
  1. Open Settings from the Start menu
  2. Navigate to the Choose default applications by file type
  3. Scroll dow the alphabetic list of file extensions
  4. Note some extensions are not associated with an application
  5. The .htm extension is already associated with Google Chrome
  6. The .html extension is associated with Microsoft Edge: click on the Microsoft Edge logo to open the list of alterantive applications
  7. Select the application you wish to associate with the extension

Software installation wizards often offer you the option of associating the new software being installed with appropriate file types.

3. Problems

It is very likely that unusual or long file names will be incompatible with other software and from time to time you may come across some interesting edge cases.

I recently had an instance of a PAT folder that would not compress. No warning was given as to what the problem was — the command simply failed to do anything. It turned out that there was a PDF with an incredibly long name saved in a sub-folder.


References:

  1. https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
  2. https://www.howtogeek.com/179173/ask-htg-why-is-windows-reporting-this-folder-is-too-long-to-copy/

By MisterFoxOnline

CAT Educator

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.