What is a Computer File?

M. McGee

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.

Woman doing a handstand with a computer
Woman doing a handstand with a computer

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.

You might also Like

Readers Also Love

Discussion Comments


Computer file recovery can be an effective technique in recovering those files you’ve accidentally deleted. The deleted files are in one partition of the hard disk and the recovery software searches that location to recover the files. Some scientists have even developed algorithms to recover files once thought to be permanently scrubbed, but I don’t know how effective those techniques are.


Most operating systems will look at the computer file extension to determine what kind of file it is. Some files are executable files (they end with the .exe, .com or .bat extensions) while other files are text files, spreadsheet files or other files meant to be read and interpreted by some program. With Windows, double-clicking on the executable files will immediately run those files.

This can be a double-edged sword if those files contain viruses. That’s why it’s best if you get file attachments that you’re not sure about, don’t double-click them. That will immediately launch them and the viruses will run. At best, rename the file extension to something like “.txt” or something that the computer won’t try to run automatically. Of course the best policy is just to delete those attachments that you’re suspicious of.

Post your comments
Forgot password?