If you're browsing the data you've stored on your computer or smartphone, you may come across the notion of information being divided into files and folders. In general, the difference between a file and a folder is that a file contains information directly while a folder contains files and other folders. In most modern operating systems, files are represented visually with an icon indicating the program that usually works with them and folders are represented with an image of a traditional manila-style folder.
Difference Between Files and Folders
A file is the standard unit by which information is organized on a computer's long-term storage, such as a hard drive, solid-state drive or DVD. Typical types of files you might find on a computer or smartphone include Microsoft Word documents, Microsoft Excel spreadsheets, Adobe Photoshop files and GIF images.
Video of the Day
To keep data organized, files are usually grouped into a nested structure of folders. In some cases, folders are also referred to as directories. Each folder can contain ordinary files and additional folders, which themselves can contain more files and folders. Generally, a file or folder has one parent folder that contains it, though operating systems allow references to files to be stored in multiple folders.
The full location of a file, sometimes known as its path or pathname, includes the list of all the nested folders in which it's contained. On Microsoft Windows, these folders are typically separated with a backslash (""), while on other operating systems and the World Wide Web, they're separated by forward slashes ("/"). Typical Windows pathnames look like "C:\My Documents\Folder Name\myfile.doc," typical macOS pathnames look like "/Users/UserName/My Files/myfile.txt," and typical World Wide Web addresses look like "http://www.example.com/folder/file.html."
To distinguish between a file and a folder, look for the icon next to the file or folder. If it looks like a traditional paper folder, it's likely a folder, and otherwise, it's likely a standard file. If all else fails, you can double-click a file or folder to open it and see whether it opens as a folder to show other files and folders or opens in an associated program.
When Files Act Like Folders
In some cases, a file can behave like a folder. Common examples are compressed files, such as ZIP files. These contain multiple files and folders joined together and mathematically altered to save space without losing data. They can be treated as single files by some programs, but most modern operating systems including Windows and macOS allow them to be effectively treated as folders as well. The operating system decompresses them and allows them to be browsed as folders.