Computer file

Computer file is a collection of electronic data representing a document, image, program, or other body of information on a computer. The file is the basic unit of storage for computer information. Organizing information into computer files enables it to be conveniently stored, shared among computers, and transmitted over the Internet.

Computers can store written documents as text-only files. Database files contain a series of organized records. Pictures are stored as graphics files, and sounds as audio files. Even the instructions that tell the computer what to do reside in a file. Such files are called executable files, because the computer executes (carries out) the instructions.

Files are typically organized on a computer much as paper files are organized in a filing cabinet. Directories contain similar files. One directory might contain word processor files, another database files, and still another computer games. Subdirectories (directories within larger directories) enable further organization and classification of files.

Computers store electronic data on such devices as hard disks or removable storage media, such as DVD’s and flash drives (see Computer (Memory and storage.) ). The locations of the various directories and files are tracked in a file allocation table, enabling the computer to quickly locate any file.

Different kinds of computers use different naming standards for computer files. On most personal computers (small computers used by one person), file names have two parts. A user creates the first part of the name to describe the contents of the file. The computer creates the second part of the name to identify the file type. For example, report.txt might be the name of a written report. The txt would indicate that it is a text-only file.