66

I started using computers with MS-DOS and as far as I can remember the data structure holding files was called a directory (it held other directories as well), DIR is still used to list the content of such structure. When I transitioned to Windows XP--I didn't go through the Win 95, 98, 2000 phase--the similar structure was called a folder and today you barely hear directory among regular users. So when the naming changed and why? Was directory a FAT16 structure or one or the other had attributes or other technical or low level differences?

user3840170
  • 23,072
  • 4
  • 91
  • 150
user10191234
  • 1,945
  • 2
  • 8
  • 29
  • 18
    This most likely came from Mac. DOS had it from Xenix. – Thorbjørn Ravn Andersen Jan 17 '23 at 05:59
  • 8
    As a side comment, the term 'directory' is widely used in the powershell community. – Walter Mitty Jan 17 '23 at 11:29
  • 9
    As another side comment, the Amiga Workbench referred to directories as "Drawers", with an icon to match the name. – Edders Jan 17 '23 at 12:25
  • 10
    MS merely changed the terminology from the almost universal (at the time) "Directory" to "Folder" as part of their transition to a "document-oriented" philosophy for their UI and application products. – RBarryYoung Jan 17 '23 at 13:55
  • 7
    "folder" is half the syllables as "directory", so is more efficient :) – hegel5000 Jan 17 '23 at 16:08
  • 3
    I would argue that increasingly, lay users have no concept of either. – tripleee Jan 18 '23 at 18:32
  • 1
    @WalterMitty it has nothing to do with powershell. Bash, cmd... and most cli tools still use the term directory. "Folder" is only used in GUI – phuclv Jan 19 '23 at 09:42
  • 1
    @Edders Icon to match the name, or name to match the icon? – CGCampbell Jan 19 '23 at 10:28
  • @CGCampbell Purely speculation: I presume the idea to call directories drawers came before creating the icon. It is of course possible that someone created the drawer icon before calling them such, but it seems less likely. – Edders Jan 19 '23 at 12:03
  • @hegel5000 Also easier to spell for non English speakers. – user10191234 Jan 19 '23 at 13:47
  • 1
    Researched a devblog entry from 2007: “Folder” is the progid for any shell folder. It could be a virtual folder (like Control Panel) or a file system folder (like C:\WINDOWS). “Directory” is the progid for file system folders. This is a subset of “Folder”. -- So, by 2007 Chen of Microsoft, at least, was referring to everything when he said Folders, and Directories was a minor subset. – CGCampbell Jan 19 '23 at 15:48
  • Directories do not contain files. They contain information about files, just as the board in the lobby of a building tells you where to find various offices. Directories are a filesystem concept. Folders are an abstraction at a higher level than the file system. It's true that many folders correspond directly to filesystem directories, but Folders can represent collections of system resources besides files. The folder abstraction operates as though the folder actually contains resources (in the case of a folder that represents an archive, like a ZIP file, it actually does). – Adrian McCarthy Jan 19 '23 at 18:17
  • @Edders Amiga Workbench used "folders" but AmigaDos used "directories" in both the commandline and in .library API calls: http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node059A.html – hippietrail Feb 03 '23 at 07:19

10 Answers10

70

Directory is a filesystem concept. Folder is a user-level concept.

From its beginning in the 1980s, the Macintosh GUI (and possibly other GUIs before it) only talked about "folders" and showed them on-screen as manila folders.

In the MS-DOS world, it was still about "directories". Windows, up to Windows 3.1 I believe, stuck with the MS-DOS concepts because people were still using DOS daily. File handling in Windows was done mostly through the File Manager, which navigated a hierarchical directory structure reflecting exactly what was on the disk.

Starting with Windows 95, the metaphor morphed into a more modern form and the word "folder" became the norm. The Windows Shell handled all File Explorer windows, plus the desktop, but was not limited to showing files in the way they were physically stored in a directory. There were abstract folder-like objects such as the Recycle Bin and the Fonts folder, and the desktop itself, and My Documents. Concepts such as Network Neighbourhood represent things that are hierarchical but aren't quite directories.

Windows user interface guidelines started to move away from the concept of the C: drive and all its directories, and encouraging applications to store files automatically under the Shell's My Documents folder unless the user chose otherwise. Office, of course, led the way to this approach.

This merged nicely with multiple-user concepts being introduced with Windows NT 3.5 and 4.0, with each user seeing their own My Documents folder in a convenient, predictable way, while physically it was stored in a user-specific directory somewhere under C:\WINNT\Profiles to help enforce access restrictions.

Today, the folder concept is stretched further with things like OneDrive or DropBox, which appear as folders in File Explorer and are based on physical disk directories but have some abstract extent into the Cloud, to the point where you may not know exactly if a given file you see on-screen is stored locally.

In summary, a directory is always a folder, but a folder can be many other things, and modern non-techie users see everything as a folder and have no concept of a directory.

Nimloth
  • 2,068
  • 8
  • 16
  • 6
    On the original Macintosh File System, all files on a drive were stored in the same directory, but each file's directory entry had a byte associated with it to identify which folder (if any) it was in. – supercat Jan 17 '23 at 19:02
  • 4
    Isn’t the file system a user-level concept? – user3840170 Jan 17 '23 at 19:03
  • 6
    @user3840170 it's a lower level concept, often tied into the kernel - a filesystem refers to the structure of bytes on the drive used to store and index files and the software necessary to read, understand and interact with it. From a user perspective, the operating system is responsible for presenting a common interface of folders and files arranged in a tree. Think about an NTFS hard drive and a FAT32 USB drive - those are two different filesystems, but they appear to the user to be the same thing. – Blackhawk Jan 17 '23 at 19:43
  • 3
    @user3840170 the next question you might ask is, "if everything is the same to the user, why not always use the same filesystem?" The answer is that each filesystem has different performance characteristics and limitations, and some provide additional features such as data redundancy, snapshotting, consistency guarantees, etc. – Blackhawk Jan 17 '23 at 19:46
  • 1
    @user3840170 No, a file system is the way (file) data is structured on a disk. It defines how to find a root directory (if one exists), how to find files and how to find the file content and maybe other information about that file or the media. A FAT device structures that information different from a NTFS, which again is different from a Mac HFS or a Linux ext4. Confusion may stem from the word 'filesystem' also often use to mean the driver/translation layer used by an OS to translate these device specific information into abstract structures the OS knows to handle. – Raffzahn Jan 18 '23 at 01:30
  • 1
    Indeed, the original Mac OS used "Folder" exclusively (even having an "Extensions folder", etc. as official terms), which probably spurred the transition. It also just makes sense: The word "directory" was never a good fit, conceptually—it referred, originally, to the index file (the "directory" of files) that held the information about its contents, because that's how container-structures are represented in the filesystem. But users never cared about that, and shouldn't have to. Plus, in these days of network filesystems and etc., many folders are virtual and have no actual directory. – FeRD Jan 18 '23 at 15:28
  • 3
    For me, directory is definitely a user concept without taking that as a claim that it cannot also be an operating system structure. When I started out on UNIX, I thought is a directory as a directory - more or less a file that contained information about and links to other files that might also be directories. I found this structure very easy to work with. There is no improvement on that regarding OS that use the word "folder" for this. Indeed, under the Windows WSL, they are often very closely mapped to each other - depending on whether you use CLI or GUI. – Ponder Stibbons Jan 19 '23 at 05:48
  • 2
    A file system may be the way data is structured on disk but a virtual file system isn't. The virtual filesystem is what defines the "directory" concept, which is then implemented by things like ext4, NTFS, FAT32, ZFS, ... "directory" is very much a higher level concept. – Kaz Jan 19 '23 at 07:37
  • 1
    @user3840170 You are obviously a power user, or advanced one. You might not get it. Consider someone who uses you as 'tech support' We all have that person or persons. For me it's my mother and father. I'm 58, and they are in their 70's & 80's. My father is a new "power user." He asks a question, I give him the real answer and he learns and goes out and discovers things and how they work on the Internet. My mother? Biggest challenge of my entire life is/was teaching her how to use a computer. She doesn't get any deep system concepts. C Drive? No way. Manilla folder on the desktop, she gets. – CGCampbell Jan 19 '23 at 10:35
  • 1
    Just because some users have trouble understanding it doesn’t make it not a user-level concept. I am not even claiming that most users even know the term ‘file system’ itself; however, the idea behind it, ‘data on storage media are organised in files kept in a hierarchy of directories’, was and still largely is exposed even to not particularly technical users (those that use locally-run, non-browser applications at least). And by the way, Windows 3.x, the first that managed to be at least somewhat user-friendly, still called them ‘directories’, not just in APIs, but in user interface. – user3840170 Jan 19 '23 at 15:14
  • With Dropbox the files in the cloud are always backed by local files, unless they are excluded from synchronization at a given host (and in this case you don't see them in the File Explorer). A better example would be NFS or SMB folders, which indeed are completely remote. – Ruslan Jan 19 '23 at 17:59
  • I haven't used Dropbox in a while, frankly. But for OneDrive there really is a mix of local and remote files in the same folder, and they're downloaded on demand and possibly erased (!!) as needed (see "Storage Sense" in Win 10). A phone or camera connected via USB in PTP or MTP mode is not a filesystem but is shown as a folder anyway. The key point is that a Windows Shell folder is a list of items enumerated by software, possibly non-Microsoft software, and the simple listing of files in a physical or network directory is just one case out of many. – Nimloth Jan 19 '23 at 22:02
42

TL;DR:

No, 'Directories' were never replaced by 'Folders'. They are the same.


The names just represent different views:

  • Directory is the data structure holding information about files (and other directories). It is what OS and all applications work with.

  • Folder is the mental image GUI systems invoke by using icons looking somewhat like folders. It's part of the desktop metaphor the Windows GUI uses.

The different viewpoint is already present with 16-bit Windows (3.1, etc.) running on DOS. When looking at a drive from DOS with DIR it shows directories. Looking at the same drive using the Windows file manager it will show neat folders.

A folder is to a directory as a document is to a file (*1) - simply an alternative name for users to handle data in a office-like fashion, not caring about terms those techno nerds came up with. :))

So when the naming changed and why.

It never did.

It may just be that you're nowadays more in contact with people who are non-techies - as well as reading documentation rather made for them, only using those metaphorical names of Folders and Documents instead of Directories and Files.


*1 - Well, one may restrict the term 'document' to 'data file', but that's kind of moot as in the original GUI definitions no files other than data files were user visible. The GUI metaphor of a desktop doesn't use programs, but various tools represented as icons (or properties). The user should not have to care about how a function is provided - or what a program is at all.

Likewise there were no drives, but drawers. Drawers were where files and folders could be put. The mundane idea of them being a specific user side visible drive with cryptic names only crept in when GUIs were add-ons - like windows.

Toby Speight
  • 1,611
  • 14
  • 31
Raffzahn
  • 222,541
  • 22
  • 631
  • 918
  • 8
    I've always been accustomed to think of the pair as "folders and files" in modern times. A "directory" is an older synonym for folder, whereas a "document" is only a specific kind of file (not a synonym for computer files generally, as there are many files that would not be regarded as documents). – Steve Jan 17 '23 at 11:39
  • 2
    @Steve Well, one can restrict the term 'document' to 'data file', but that's kind of moot as in the original GUI definition no other files were user visible. Prior to Apple the Idea was that a user would not see any 'program' but simply act on documents which he can organize in folders and drawers. Today's GUI are a hybrid of classic DOS like systems where users manipulate programs as well and pure GUI. – Raffzahn Jan 17 '23 at 13:10
  • 8
    Nit: they're not exactly the same. Some 'folders' are not 'directories' in Windows. There are cases of truly virtual folders manufactured by the desktop (Explorer or whatever), with no immediate counterpart in the file system. And trivially of course the term 'folder' is sometimes used for other non-file-system containers, e.g. a key in the Windows registry. – dave Jan 17 '23 at 13:30
  • 1
    Both "folder" and "file" are metaphorical names. A filesystem directory isn't literally a folder (a large folded sheet of paper for holding smaller pieces of paper), but it serves a purpose kind of similar to a folder, so it was named a "folder" metaphorically. And a delimited data unit isn't literally a file (a collection of papers that have been bundled together), but it serves a purpose kind of similar to a file, so it was named a "file" metaphorically. – Tanner Swett Jan 17 '23 at 13:57
  • 4
    @another-dave that is because it's a metaphor, not an implementation. Then again, not every directory in a file system may be a directory of it's own, or real, as there are things like likes and virtual directories (think linux' devfs, or MS-DOS' \DEV 'directory' ) – Raffzahn Jan 17 '23 at 14:04
  • 2
    @TannerSwett the term for file is older than disks or directories, as stacks of punch cards were already called files. – Raffzahn Jan 17 '23 at 14:05
  • 8
    @TannerSwett's comment made me remember I had a hard time grasping the 'desktop metaphor' since I'd never actually owned a filing cabinet. (This was long after I was totally familiar with files, directories, volumes, etc.) Since I imagine that Young Persons Today don't use filing cabinets either, the whole 'folder' thing may be pointless. But then again we're dealing with systems where 'save' is represented by a picture of a floppy disk. Now get off my lawn! – dave Jan 17 '23 at 18:14
  • 7
    I don't think this is a very useful answer... or at least it focuses so much on only half the answer that it harms its ability to do that for lack of proper context. The question appears to be at least 50% an "in the minds of users" question, and "folder" very much did replace "directory" in mainstream usage and mainstream user-oriented documentation. – ssokolow Jan 17 '23 at 23:51
  • 2
    @ssokolow Not sure what you want to point out. The question asks about technological reasons, which there are none. Also, Folder did not replace directory. It's all about the PoV taken - and the audience targeted. The assumed replacement never happened. Isn't it? – Raffzahn Jan 18 '23 at 00:12
  • 3
    @Raffzahn The replacement happened in the sense that there are effectively three separate concepts (the data structure, the visual metaphor, and the unit of organization) and the original poster observed the terminology for the unit of organization shifting from being drawn from the data structure to being drawn from the visual metaphor. It's unarguable that everyday users manipulated "directories" in the DOS era and "folders" in the Windows 9x era and beyond, even though they were manipulating the same "unit of organization". – ssokolow Jan 18 '23 at 05:06
  • 2
    @ssokolow For one, the asks for a technical reason, which there isn't. Next, if switching from a driver seat to a passenger seat the car doesn't change. just the persons view. And last, when opening a command window in Windows, he's still working on directories, not folders, which proves that the assumed was no "replacement" never happened. – Raffzahn Jan 18 '23 at 10:04
  • 3
    @Raffzahn Well, if you're sticking to that last sentence after what I said, I think we've reached an impasse because, from my perspective, you're denying reality. Most users and most user documentation uses the term "folder" to refer to the unit of organization (as opposed to the underlying data structure), not "directory" and have for over a decade. – ssokolow Jan 19 '23 at 12:42
  • @Raffzahn: In a comment you mention "MS-DOS' \DEV 'directory'" as an example of a virtual directory. I wasn't aware that MS-DOS had such a directory – is it similar to e.g. CON and NUL? I'd like to read up on that, but given the ubiquitous use of "dev" as short for "developer", searching for something like "ms-dos dev directory" is kind of bound to be doomed. Do you have a useful starting point for me? – Schmuddi Jan 19 '23 at 12:45
  • @ssokolow I seriously don't understand why you try so hard to imply something I never wrote. In fact I did state the very issue you claim I do not, that a folder today's user side view of what a directory on a media is. It still doesn't mean there was any change, especially not one made by any file system, as the Question assumes. – Raffzahn Jan 19 '23 at 13:18
  • @Schmuddi Well, wouldn't that make a great question? When creating MS-DOS 2.0 MS wanted it to be a bridge over to their Unix (Xenix), as that was seen as the future OS. Beside of adding sream interfaces, nested directories and other Unix orientated features they also added a virtual device directory called DEV. any device name known to MS-DOS could be used in DOS1.0 fashion (like CON:) or Unix like as \DEV\xxx (note, no colon needed). there was even a config flag (IIRC) to enforce that use, invalidating the old naming. – Raffzahn Jan 19 '23 at 13:22
  • 2
    @Raffzahn I'm saying that lines like "It may just be that you're nowadays more in contact with people who are non-techies" are harmfully misleading. Techies used to use "directory" for two concepts, one of which was the data structure and one of which was the unit of organization that non-techies talk about. You don't have to be in contact with more non-techies to see a shift. The answer could simply be that the original dual meaning of the term conflated the two concepts and, now, they've been misled by that conflation breaking. – ssokolow Jan 19 '23 at 21:34
28

1984 Mac: They did mean different things

The original file system of the Macintosh was called MFS (Macintosh File System). It was released with the first Macs in 1984. In this file system, "directories" and "folders" did actually have different meanings.

MFS is a "flat" file system. Each floppy disk ("volume") contains exactly one directory, a table that contains information about all of the files on the volume:

A volume contains descriptive information about itself, including its name and a file directory that lists information about files contained on the volume; it also contains files. The files are contained in allocation blocks, which are areas of volume space occupying multiples of 512 bytes.

Apple Computer, 1985. Inside Macintosh, volume II, p. II-79

Every file on the volume is listed in this one directory.

Each directory entry has a 16-bit signed integer field called fdFldr, the "folder number" of the file. The Finder created new folders by choosing another number. Files were placed into folders by setting their fdFldr. The number of folders was limited only by the size of the fdFldr field.

This system was horribly inefficient. To iterate through all of the files in a single folder, you had to iterate through every file on the volume, checking to see if its fdFldr matched your desired folder.

So they were different things in MFS.

1986 Mac: They now mean the same thing

By 1986, Apple developed an improved filesystem called HFS (Hierarchical File System). Directories were now nested. It was much more efficient; when you iterated a directory, you accessed just those files in that directory. Apple acknowledged that the folders in MFS had been merely an illusion:

The hierarchical directory structure is equivalent to the user's perceived desktop hierarchy, where folders contain files or additional folders. In the 64K ROM version of the File Manager, however, this desktop hierarchy was essentially an illusion maintained completely by the Finder (at considerable expense). The introduction of an actual hierarchical directory containing subdirectories greatly enhances the performance of the Finder by relieving it of this task.

Apple Computer, 1986. Inside Macintosh, volume IV, p. IV-90.

With HFS, Apple also acknowledged that folders and directories were now the same thing:

directory: A subdivision of a volume that can contain files as well as other directories; equivalent to a folder.

ibid, glossary p. IV-312

So now they were the same thing. (Well, technically folders could only be subdirectories, because root directories were volumes.)

DrSheldon
  • 15,979
  • 5
  • 49
  • 113
  • 2
    Huh :)) Like that being dug out. Upvote for historical detail. Just two points A) while being a single directory (catalogue) file system the folder numbers are what creates a levels - something otherwise called directories. Directories do not have to be recursive structures to work. A similar way was used on some mainframe file systems that had their catalogue in single key ISAM structures. B) Maybe more relevant, your explanation makes it look as if they are a first by Apple, but Folders existed already before the Mac - Jobs saw them at PARC. – Raffzahn Jan 18 '23 at 01:22
  • You could argue that the fdFldr number was really just MFS's way to implement directories. i.e. it is an implementation detail. – JeremyP Feb 03 '23 at 09:18
26

I believe this is a distinction without a difference. As described reasonable well in the Wikipedia article on "directory", folder is more of a way of describing the use of a directory for holding user files. But there is no fundamental difference - directory and folder are two names for the same thing.

In fact (though someone will likely prove me wrong with examples in specific operating systems), I don't think there has been any fundamental change at the operating system (e.g., the many versions of Microsoft Windows) level. Rather, the change is among regular users. FAT16, FAT32, NTFS, HPFS (OS/2), APFS (Apple File System) all seem to refer internally to directories and it is only at the user level that the folder designation is used. Of course, the folder icons used by modern operating systems, combined with many users never using the command line, increases the use of "folder" among regular users.

Go to the command line and it is mkdir, cd, pwd, etc. Not mkf or cf or pwf. The change to folder is external, not internal.

15

Folder is a concept that probably1 originated with the MacOS operating system (note the capital M, it's the original Macintosh operating system, not the one that used to be called OS X).

The term "folder" is a user interface concept that means "container for documents". Folders are implemented in macOS as file system directories but they are not identical. To understand why this is, you have to understand how documents are implemented. Documents are usually implemented as files2. However a document can sometimes be a "bundle" which is a collection of files in a directory. The top level directory has a special attribute set that makes it look like a single entity to the graphical user interface. The most obvious examples are Macintosh applications. These look like single objects in the GUI but, from the command line, if you list them, you can see they are directories.

jeremyp@eleanor dev % ls -l /System/Applications/TextEdit.app        
total 0
drwxr-xr-x  8 root  wheel  256  2 Dec 11:37 Contents
jeremyp@eleanor dev % ls -l /System/Applications/TextEdit.app/Contents 
total 16
-rw-r--r--   1 root  wheel  9263  2 Dec 11:37 Info.plist
drwxr-xr-x   3 root  wheel    96  2 Dec 11:37 MacOS
-rw-r--r--   1 root  wheel     8  2 Dec 11:37 PkgInfo
drwxr-xr-x  59 root  wheel  1888  2 Dec 11:37 Resources
drwxr-xr-x   3 root  wheel    96  2 Dec 11:37 _CodeSignature
-rw-r--r--   1 root  wheel   457  2 Dec 11:37 version.plist

So, in summary, a folder is a directory3, but a directory is not always a folder.

The same may not apply on Windows which does not have the same concept of bundles AFAIK.


1It may be that Apple appropriated the terminology from e.g. Xerox

2The term "file" has always been a source of annoyance to me. In dead tree technology, a file is a folder or a binder containing documents, so, really a file should be analogous to a folder/directory. I guess the terminology comes from the punched card days where each card would be a record and a stack of them would be a file.

3Except when it's not. Some applications use the term folder to refer to things that are not implemented as directories e.g. the mail app lets you have folders associated with mailboxes. The Apple mail app implements these as a combination of sqlite files and a directory, but it doesn't have to.

JeremyP
  • 11,631
  • 1
  • 37
  • 53
  • 2
    On "files", I would guess a "file" was primarily conceived as containing organised data - so the basic unit of a file system, the file, is something that practically always has some further internal structure. – Steve Jan 17 '23 at 11:35
  • 5
    After carefully explaining in the first paragraph that you're talking about the original MacOS, you immediately switch to talking about applications on the modern (Unix-based) macOS. Applications on the original MacOS were single files, with additional elements stored in their resource fork. I believe the Amiga Workbench used the "application as magic directory" technique, but the relationship of the whole thing to the "directory" vs "folder" distinction seems tenuous. – IMSoP Jan 17 '23 at 21:07
  • 1
    You may want to incorporate footnote#1 direct into the text, as PARC had them before, which is were Jobs (probably) saw the concept first. – Raffzahn Jan 18 '23 at 01:25
  • @IMSoP On the Amiga an "application" was just an executable file. The term "application" was not used though. Me and my friends called them "programs". I can't remember what the Amiga docs called them. AmigaOS did not have a native concept of resources either in the program file or external files. Some programs had only the binary executable file and some had a bunch of files and directories in custom formats. So I don't think "application as magic directory" is correct any way I interpret it. – hippietrail Feb 03 '23 at 07:29
  • 1
    @hippietrail I mis-spoke; it was Acorn RiscOS that I was thinking of. – IMSoP Feb 03 '23 at 09:26
12

In my point of view, this is more a GUI vs. command line differentiation. Within a *nix-shell, I still "mkdir" and not "mkfolder". But in most of the window managers (not all), the icon resembles a physical folder. Same with the transition from MS-DOS to Windows.

FosCo
  • 137
  • 2
  • This. Some other answers (Raffzahn's also Nimloth's) sort of allude to this point, as do some other answers that provide additional useful information/perspective. But "directory" is a term still thoroughly, heavily used where "command line" usage remains very common, including Unix and CMD.exe where some very commonly used commands reference the concept of a "directory". (Perhaps the question asker presumed the terms changed over time because the asker used GUIs more over time.) – TOOGAM Jan 18 '23 at 19:22
10

Since the question body seems particularly focused on Windows, I am going to answer the question of when the name change happened in Windows. This answer is pretty easy: the name change happened in Windows 95.

Back in Windows 3.x, containers for files were named ‘directories’, just like they were in DOS:

Screenshot of Windows 3.11 File Manager, with the ‘File’ menu pulled down, revealing a highlighted ‘Create Directory...’ item

Windows 95 introduced the name ‘folder’:

Screenshot of context menu displayed on top of Windows 95 desktop, with the ‘New’ submenu pulled out, revealing a highlighted ‘Folder’ item

The name change happened apparently pretty early in development: Toasty Tech’s gallery of screenshots shows that directories were named ‘folders’ already in Chicago build 58. This was before the introduction of FAT32 (which only appeared in Windows 95 OSR2), and even before long file name support was implemented.

Keep in mind, though, that in Windows, ‘folder’ is a name a bit broader than ‘directory’, in that it covers not only containers for files that usually correspond to records on storage media, but also ‘virtual folders’ like the Control Panel, Network Neighborhood or My Computer, which like directories are presented in the shell as having enumerable contents, but don’t have actual pathnames and act only as symbolic representations of more abstract resources. And at least at one point during development, the notion was going to be even more expansive than that. One mock-up found in the Microsoft Windows “Chicago” Reviewer’s Guide shows the Explorer being used to read mail inside an ‘Info Center’.

As for motivation for the new name, I can only speculate. Part of it was probably Macintosh envy; on the Mac, containers for files presented in the UI were called ‘folders’ (and, as @DrSheldon’s answer explains, initially did not correspond to directories in the disk format sense in the non-hierarchical file system used by the OS). Part might have been a desire to reflect the broadening of the abstraction to cover entities other than on-disk directories. But it also made sense on its own terms: another reason might have been a desire to reinvigorate the desktop metaphor. Notice for example, how Windows 3.x uses a folder icon for directories, and a filing cabinet icon for the file manager. Chicago simply changed the terminology to match: the new file manager was called the ‘Cabinet Explorer’ (though the ‘Cabinet’ part was later dropped), while directories were renamed to ‘folders’. And files, of course, are represented by icons showing sheets of paper. The renaming made the terminology coherent with the icons, and made it again a live metaphor for data organisation in an office.

user3840170
  • 23,072
  • 4
  • 91
  • 150
7

Let's consider the classic definition of directory:

a book listing individuals or organizations alphabetically or thematically with details such as names, addresses, and phone numbers.

When computer scientists came up with the concept of a list of files stored in some organization, a directory immediately came to mind. All kinds of file systems had a directory listing for a list of files on a disk. Later, these directories could be nested using additional directory listings.

Now, we can look at the ordinary definition of folder:

a folding cover or holder, typically made of stiff paper or cardboard, for storing loose papers.

When computers first gained a GUI, there were analogies abound. The workspace was called a Desktop, deleted files would go in the Trash or Recycle Bin, and files were typically Documents. Since Documents could be analogous to printed media (also called documents), organizing those Documents would place them into Folders.

It's important to note that Folders are a GUI concept, and a Directory is a CLI concept. In most GUI systems, a Directory is often exposed as a Folder, but Folders can be other kinds of things as well. For example, Windows has various Magic Folders that can expose administrator tools and so on that are not actually stored in a real Directory. Similarly, most file systems can have Directories that are special, such as mount points and junctions/links.

Modern users, such as programmers, that are aware of the distinction, will often be specific about using the correct terminology. If they ask you to open a terminal, you'll almost certainly be working with directories, while if they ask you to open a File Explorer (or equivalent), they'll refer to the things they're working with as Folders.

As a metaphor, you can say that Directories are to Folders, as Files are to Documents. They mean essentially the same thing, but are slightly different in actual implementation and have slightly different meanings. In a CLI, you don't refer to a Directory as a Folder, and in a GUI, you don't refer to a Folder as a Directory.

Finally, as an example in programming, some languages use functions, and some languages use methods. They mean the same thing--a block of code to be translated to machine instructions--but the language you're using will reflect the terminology of the language itself to avoid confusion. In Java, you write methods, and in JavaScript, you write functions. Both accept parameters, have a return type, etc, but are simply called different things, as they were developed by different people.

phyrfox
  • 2,503
  • 1
  • 13
  • 14
3

The terms are essentially interchangeable metaphors for the same thing, but they are coming from different directions.

From one direction, you can start with a physical device (perhaps called a "drive", "disk", "volume", or "device") which stores a number of pieces of data (perhaps called "records" and "data sets", "inodes", or "files"). You want a way to reference them without knowing their physical location.

This leads to metaphors like a "directory", "catalog", or "index" - a list of names, pointing to their corresponding locations on the storage medium.

From the other direction, you have a number of logical objects (perhaps called "documents", or just "files"), and you want a way to organize them, independent of their physical location.

This leads to metaphors like "folder", "drawer", or "area" - a physical location or object which contains other objects.

The "container" metaphor is slightly more abstract: there might or might not be a "directory" or "catalog" underneath; notably, the original Apple Macintosh had "folders" which were actually stored as a label against each file, the whole disk having a single directory listing all files. When that was replaced by the Hierarchical File System, the user interface didn't need to change, because it was already using an abstract metaphor. This is a general trend: hiding details behind additional layers of abstraction.

The "container" metaphor also fits well with window and mouse based UIs: you can "open" a folder, drag a file "out of" it and drop it "into" another. The "directory" metaphor is more suited to text-based and automated processing: you can "examine" the directory, "add" and "remove" entries, perhaps even edit it as though it was a text file.

IMSoP
  • 885
  • 1
  • 7
  • 12
-1

The Folder is of a higher level of abstraction than the directory. The ideas of the functionality of a folder was thought up before the folder was a consept, so file systems have some of it, but this is about the consepts. The directory structure is tied to the hardware. a hard drive has a root directory and sub directories. and files stored in them. At least originally. A folder is tied to a user interfase. Not neccesarily to a piece of hardware. Why this is confusing is because the difference is rarly taken advantage of.

But a place where it is used is in your start menu in Windows. Your start menu will show the content of your users start menu AND the content of default users (or everyone) start menu. and as another example, your MyDocuments folder could have subfolder named MyLocallyStoredDocuments, MyNetworkStoredDocuments and MyCloudStoredDocuments. Only 1 of those folders would logically be stored in Your local dirfectory. but all 3 in the MyDocuments folder.

  • 1
    This is not true. The three directories you mention would all be within the MyDocuments directory. Calling it Network or Cloud doesn't mean that that is where it is located. If you put a symlink to a remote directory, it still isn't a directory within a directory, just a file. – Chenmunka Jan 19 '23 at 14:57
  • 1
    Besides, wasn't the first thing anybody ever did with a new install of Windows to run Regedit and delete every single key that mentioned MyDocuments? But that is another story. – Chenmunka Jan 19 '23 at 14:58
  • I always understood "folder" to be a GUI metaphor for a directory, rather than an abstraction. – Toby Speight Jan 20 '23 at 15:36
  • @Chenmunka: Not everyone. In fact I've never heard of doing that before. I've had PCs since the 486 days and was pretty nerdy and low-level. – hippietrail Feb 03 '23 at 07:45