A file may refer to any of the following:

  1. A file is an object on a computer that stores data, information, settings, or commands used with a computer program. On a computer there are three types of files, application files, data files, and system files.

In a GUI (graphical user interface), such as Microsoft Windows, files display as icons that relate to the program that opens the file. For example, all PDF icons appear the same and open in Adobe Acrobat or the reader associated with PDF files. If a program is associated with a program, double-clicking the icon opens it in the default program.

How are files created?

A file is created using a computer software program. For example, to create a text file you would use a text editor, to create an image file you would use an image editor, and to create a document you would use a word processor.

  • How are files created?

  • Where are files stored?

  • File management

  • File extensions and file types

  • How long can a file be?

  • Why do files have different icons?

  • Illegal file characters

  • How are files different than a directory or folder?

  • Related information

  • File help and support

  • How to create a computer file.

  • How to open, view, and edit the contents of a file on a computer.

Where are files stored?

Computer files are stored on a drive (e.g., the hard drive), disc (e.g., DVD), and a diskette (e.g., floppy disk) and may be in a folder (directory) on that medium.

File management

Microsoft Windows computer users can view, manage, and organize their files with Windows Explorer and Apple users can use the Finder. See our file system definition for further information about file management.

When saving a file to your computer, you are saving the file to the hard drive.

  • How to list files in a directory or folder on the computer.
  • How to copy files.
  • How to move files and folders on the computer.
  • How to change or rename a file, folder, or directory.
  • How to delete a file, directory, or folder.
  • How to find a file on a computer.

File extensions and file types

There are millions of files used with computers today that are identified either by the file extension or the file’s data. For example, the picture of Windows Explorer above is the “Regedit.exe” file. “Regedit” is the name of the file and “.exe” is the file extension that identifies the file as an executable file. The next file “RtlExUpd.dll” is a DLL file and another example of a file.

  • How to view a computer file extension.
  • What are the most common file types and file extensions?
  • Listing of file extensions and their associated programs.

How long can a file be?

Earlier version of Microsoft Windows and MS-DOS has a file naming convention called the 8.3 format. This convention supported a maximum file name of eight characters and up to a three-character extension.

In new versions of Windows, the file extensions are hidden by default. If the file extensions are hidden, you can also get a general understanding of the type of file by looking at the Type column. In the above example, the “Regedit.exe” file is an “Application” and the “RtlExUpd.dll” file is an “Application extension.”

With the introduction of Windows 95, Windows joined other operating systems in supporting long file names. Now, all the latest versions of Windows can support file names up to 255 characters in length.

Why do files have different icons?

Because there are thousands of different file formats, different icons are used to help identify the type of file or what program is associated. For example, when scrolling through hundreds of files you could identify a text file by looking for a file icon that looks like a notepad. Having unique icons is also helpful for when file extensions are hidden.

  • How to associate a file with a program in Windows.
  • How to change the icon of a Windows shortcut.

Illegal file characters

With most operating systems, the below characters are considered illegal and cannot be used. Trying to create a file with these characters in the file name would generate an error or make the file inaccessible.

A file icon is often changed when the default program used to open the type of file is changed.

\ / : * ? " < > |

How are files different than a directory or folder?

A directory (folder) is an area on the computer containing other directories and files and helps keep the computer organized. Files can be contained within a directory and contain information used by the operating system or other programs on the computer. See our directory page for further information on directories.

Also, many operating systems including Windows have reserved words to also not be included in a file name. See the reserved word definition for examples of reserved words.

  1. Linux command, see the file command page for additional information about this command.
  • How to view and change the file attributes in Windows.
  • How to edit or rename a read-only file.
  • Use the Computer Hope process tool to identify many system files.
  • All questions relating to computer files and file extensions.

Batch file, Binary file, Closed file, Data file, Directory, EOF, Executable file, File extension, File format, File name, File properties, File viewer, Hidden files, Hierarchical file system, Interchangeable file, Leaf, Long file names, Native file format, Open file, Operating system terms, Orphan file, PIF, Program, README file, Record, Software terms, Swap file, System file, Text file