From Spanking Art

In computing, a file is a collection of information stored in digital form, such as an image or a text document, that can be handled (e.g. copied, deleted, renamed, or moved) as a unit. Files are stored in file systems on media such as a hard disk, a floppy disk, a USB stick, a CD-ROM, or a DVD.

A file usually has a size, which is normally expressed in bytes (or kilobytes, megabytes, etc). In addition to their content, files also have a file name and, depending on the operating system, a few bits of additional information, such as a flag that marks whether the file is read-only or not.

File types[edit]

Files also usually have a type. In Microsoft Windows and other operating systems, the file type is specified by a suffix after the actual file name. For example, most JPEG image files have a suffix .JPG or .JPEG. (Note that in newer versions of Windows such as XP, the suffix is often hidden from display by default, although it is still there.)

Experienced users know common file types and their suffixes, so they can tell that a file named, for example, soandso.exe, is probably an executable file because of the .exe suffix.

Examples of files:

Files and directories[edit]

Most computers organize files into hierarchies using directories, folders, or catalogs. (The concept is the same irrespective of the terminology used.) Each directory can contain an arbitrary number of files, and it can also contain other directories. These are known as subdirectories (or subfolders etc).

A file's name within a directory must be unique. In other words, no two files in a directory may have the same name. A file's name and the path to the file's directory uniquely identifies it among all other files in the computer system. No two files can have the same name and path. This is why if you make a duplicate of a file in the same directory, you must give it a different name. If you store the duplicate in a different directory, for example a subdirectory of the original file's directory, it may be stored under the same name.

See also[edit]

Smallwikipedialogo.png This page uses content from Wikipedia. The original article was at Computer file. The list of authors can be seen in the page history. As with Spanking Art, the text of Wikipedia is available under a copyleft license, the Creative Commons Attribution Sharealike license.