A computer file is a specific piece of data that is held on a computer system. This contained data may be anything from an executable program to a user created document. A computer file is made up of a name that creates the file’s identity and an extension that tells the operating system and associated programs what type of file it is. Files have a set beginning and end, which means they interact with a computer system in a predictable way.
Most common files are made up of a name and an extension. Originally, the name of a file was limited to eight characters, but modern systems allow for much longer file names. The name is generally determined by the user or associated program and often gives an indication of the files purpose.
A file’s extension is typically a period followed by two to four characters. This part of the filename is used by the operating system for internal cataloging. The way an extension is used varies between operating systems; some require the extension and some completely ignore it. Most systems fall in between—the extension helps identify the programs used with the file and acts as a shortcut when read.
The data in a computer file is complete and whole. The information within a file may be opened and read, given the proper software. The information contained within the file may require other information to operate, such as an executable file needing a database file to properly execute, but the executable and database files are two separate files.
Since each computer file is distinct to itself, there are certain characteristics that are common between any type of file. Every file has a size, even if that size is zero. The information stored within the file requires a location on the computer system, so each file is indexed by the system. Lastly, every file contains attributes that determine its use. These attributes, like who may open or alter a file or whether the file may be seen by normal users, are built into the structure of the file, not its internal data.
The last aspect of every computer file is that they exist in some way on the computer system. A computer file may be created or deleted, moved or copied, or altered. A user may do this by using programs associated with those files or through the file management of the operating system itself. These operations may be difficult with some files due to their interaction with the operating system, but it still may be done.