What is the difference between a directory and a folder? [duplicate]

Possible Duplicate:
Directory vs. Folder

Most people use the terms "folder" and "directory" interchangeably. Is there a difference, and if so, what is it?


Most of the times they are interchangeable terms. Directory is a classical term used since the early times of file systems while folder is a sort of friendly name which may sound more familiar to Windows users.

The main difference is that a folder is a logical concept that does not necessarily map to a physical directory. A directory is an file system object. A folder is a GUI object. Wikipedia explains it this way:

The name folder, presenting an analogy to the file folder used in offices, and used originally by Apple Lisa, is used in almost all modern operating systems' desktop environments. Folders are often depicted with icons which visually resemble physical file folders.

Strictly speaking, there is a difference between a directory which is a file system concept, and the graphical user interface metaphor that is used to represent it (a folder). For example, Microsoft Windows uses the concept of special folders to help present the contents of the computer to the user in a fairly consistent way that frees the user from having to deal with absolute directory paths, which can vary between versions of Windows, and between individual installations.

If one is referring to a container of documents, the term folder is more appropriate. The term directory refers to the way a structured list of document files and folders is stored on the computer. It is comparable to a telephone directory that contains lists of names, numbers and addresses and does not contain the actual documents themselves.


Authoritative answer given by Raymond Chen:

Windows 95 introduced Windows Explorer and along with it the term folder. What is the relationship between folders and directories?

Some people believe that Windows 95 renamed directories to folders, but it's actually more than that.

Windows Explorer lets you view folders, which are containers in the shell namespace. Directories are one type of folder, namely, folders which correspond to file system locations. There are other types of folders, such as Control Panel or Network Neighborhood or Printers. These other types of folders represent objects in the shell namespace which do not correspond to files. In common usage, the term virtual folder has been applied to refer to folders which are not directories. In other words, we have this Euler diagram:

(Virtual folders = Folders − Directories)

In general, code which manipulates the shell namespace should operate on folders and items, not directories and files, so as not to tie themselves to a particular storage medium. For example, code which limits itself to files won't be able to navigate into a Zip file, since the contents of a Zip file are exposed in the form of a virtual folder.


If you are referring to a computer's file system the terms are synonymous. "Folders" is a common naming convention when referring to directories in the context of graphical user interfaces. "Directories" is a more common term used with console based interfaces.


No, there isn't any difference.

The term directory comes from the notion that it's a directory of the files that it contains.

The term folder comes from the analogy of a cardboard folder containing documents.