What is the difference between a directory and a folder?

mafu picture mafu · Feb 22, 2011 · Viewed 56.8k times · Source

Most people use the terms "folder" and "directory" interchangeably. From a programmer point of view, is there a difference, and if so, what is it? Does it depend on the OS, or is there a broad, general consensus? This at least suggests that there is a difference.

Answer

Anand Shah picture Anand Shah · Feb 22, 2011

Check "The folder metaphor" section at Wikipedia. It states:

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. The distinction can be due to the way a directory is accessed; on Unix systems, /usr/bin/ is usually referred to as a directory when viewed in a command line console, but if accessed through a graphical file manager, users may sometimes call it a folder.