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?

16
  • 19
    This most likely came from Mac. DOS had it from Xenix. Commented Jan 17, 2023 at 5:59
  • 9
    As a side comment, the term 'directory' is widely used in the powershell community. Commented Jan 17, 2023 at 11:29
  • 9
    As another side comment, the Amiga Workbench referred to directories as "Drawers", with an icon to match the name.
    – Edders
    Commented Jan 17, 2023 at 12:25
  • 12
    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. Commented Jan 17, 2023 at 13:55
  • 8
    "folder" is half the syllables as "directory", so is more efficient :)
    – hegel5000
    Commented Jan 17, 2023 at 16:08

13 Answers 13

76

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.

12
  • 7
    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
    Commented Jan 17, 2023 at 19:02
  • 4
    Isn’t the file system a user-level concept? Commented Jan 17, 2023 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
    Commented Jan 17, 2023 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
    Commented Jan 17, 2023 at 19:46
  • 4
    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. Commented Jan 19, 2023 at 5:48
43

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.

16
  • 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
    Commented Jan 17, 2023 at 11:39
  • 9
    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
    Commented Jan 17, 2023 at 13:30
  • 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
    Commented Jan 17, 2023 at 14:04
  • 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
    Commented Jan 17, 2023 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
    Commented Jan 17, 2023 at 23:51
30
+150

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.)

7
  • 3
    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
    Commented Jan 18, 2023 at 1: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
    Commented Feb 3, 2023 at 9:18
  • @JeremyP: Did MFS allow files in different folters to have the same name? If not, the fact that all files are in the same directory would be semantically relevant.
    – supercat
    Commented Jul 29 at 21:12
  • @supercat indeed, MFS did not allow files with the same name to exist in different folders, because technically, they were all in the same (single) directory on the disk. When accessing files from programs, you also would not use the containing folder, so a file "Expenses" in folder "Financial" on disk "Business" would be called "Business:Expenses", while on an HFS volume it would be "Business:Financial:Expenses". Commented Jul 30 at 11:08
  • IIRC, the documentation for DiskWarrior also referred to ‘the directory’ (singular) for a volume — and that was for HFS+.  Was it using outdated terminology, or could that apply to filesystems much more recent than MFS too?
    – gidds
    Commented Jul 30 at 21:50
27

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.

4
  • 6
    The terms mkf, cf, pwf would also have been confusing to people who were familiar with code functions such as openf, scanf, which refer to files.
    – Kaz
    Commented Jan 17, 2023 at 15:51
  • 2
    And break scripts. But my point is that the underlying directory terminology never changed - folders are an addition but not a replacement. Commented Jan 17, 2023 at 15:54
  • 1
    @Kaz The f in scanf refers to format, not file. It seems you are the one confused… Commented Jan 21, 2023 at 13:58
  • @user3840170 It would appear so. There's my morning learning done, then.
    – Kaz
    Commented Jan 22, 2023 at 12:11
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.

5
  • 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
    Commented Jan 17, 2023 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
    Commented Jan 17, 2023 at 21:07
  • 2
    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
    Commented Jan 18, 2023 at 1: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. Commented Feb 3, 2023 at 7:29
  • 1
    @hippietrail I mis-spoke; it was Acorn RiscOS that I was thinking of.
    – IMSoP
    Commented Feb 3, 2023 at 9:26
13

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.

1
  • 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
    Commented Jan 18, 2023 at 19:22
12

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.

8

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.

5

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.

5

On the PC, GEM (following the Lisa / Mac GUI) used "Folder" from its first release in 1985.

Screenshot of GEM/1 desktop showing File menu open

4

All these answers and no-one has yet mentioned the Xerox Star

The Star basically invented the desktop metaphor (though there may have been earlier traces with the Alto), from which Apple and Microsoft later got their ideas.

The Star desktop, like real office desks, could hold file drawers, folders, and files. This is the source of our use of 'folder' in a computer context.

The question is, of course, when the term 'folder' replaced 'directory'. This won't have happened overnight, even for Star users. Perhaps people using the Star always said 'folder', but certainly out there in the world, we still said (and some of us still do) say 'directory'. If pushed, I'll use 'folder' for items manifested by a GUI, but not for those name-to-metadata files implemented in file systems.

2

The relationship between the terms "directory" and "folder" is rather operating system dependent.

OS/400 (nowadays IBM i)

When the IBM AS/400 was released in 1988, its operating system was known as OS/400. OS/400 was renamed i5/OS in 2004, and then to IBM i in 2008, under which name it survives until today. OS/400 in turn is a direct descendant of CPF, the operating system of the IBM System/38 (announced in 1978, although apparently didn't actually ship to customers until the next year or the year after.) Like many, I'm not a big fan of its current name (which is very non-distinctive, and easily confusable with Apple iOS or Cisco IOS), so I'll just call it by its original name, OS/400.

OS/400 V3R1 (1994) introduced the Integrated File System (IFS) – a virtual filesystem layer which made multiple file systems, with very different underlying technologies, appear as part of a single POSIX-style directory hierarchy. IFS integrates together several different filesystems:

  • / (root filesystem): POSIX-style filesystem, but with case-insensitive filenames
  • /QOpenSys: POSIX-style filesystem, with case-sensitive filenames
  • /QSYS.LIB: provides access to traditional OS/400 storage based on objects of various types organised into a single level of libraries; FILE (database files, corresponding to DB2 database tables) is just one of many object types
  • /QLANSrv: filesystem of LAN Server/400, which was a port of OS/2 LAN Manager to OS/400. It provides an OS/2-style filesystem, so is case-insensitive, and lacks POSIX permissions
  • /QOPT: CD-ROMs and DVD-ROMs (ISO 9660 and UDF)
  • /QFileSvr.400: provides access to data on remote OS/400 systems (using an IBM proprietary protocol, over either SNA or TCP/IP)
  • /QNTC: provides access to SMB/CIFS filesystems. At one point, IBM added embedded x86 servers to AS/400s which could run Windows NT (and later Linux), and QNTC was originally developed for them
  • /QNetWare: provides access to NetWare filesystems via NCP. No longer supported. Like QNTC, QNetWare was originally intended for use with NetWare running on an embedded x86 server, but could also be used to talk to standalone NetWare servers.
  • NFS (unlike other filesystems, doesn't have a fix mount point)
  • /QDLS: Document Library Services. Used to store word processing documents

Now, you might be asking, what relevance all of this has to the question? Well, the root file system, /QOpenSys, /QLANSrv, /QOPT, /QNTC, /QNetWare and NFS are all hierarchical filesystems, composed of files and nested directories – just like you are used to from other platforms (Windows, Linux, etc.)

Whereas, /QSYS.LIB is not a hierarchical filesystem. It is composed of objects organised into a single-level of libraries – libraries cannot be nested, except for the exceptional case of the library QSYS, which directly contains every other library. Speaking in terms of OS/400's native (pre-IFS) APIs, a library is not a directory. However, libraries are directories for the purpose of the IFS API.

/QDLS by contrast is a hierarchical filesystem. And here's where we get to the bit directly relevant to the question: instead of "files" nested within hierarchical "directories", it contains "documents" nested within hierarchical "folders". /QDLS was designed for use with IBM's Office Automation products (i.e. DisplayWriter/400, and its predecessors DisplayWriter/36 and DisplayWriter/38; also OfficeVision/400, which could be integrated – via SNADS – with OfficeVision/MVS and OfficeVision/VM aka PROFS.) As such, it is a rather deeply legacy thing – it only supports MS-DOS-style 8.3 letter file names. And, just as a QSYS.LIB library is surfaced in IFS as a directory, so are QDLS folders surfaced in IFS as directories.

But, IBM documentation is generally rather careful to restrict the use of the word "folder" to QDLS. Calling a directory in /QOpenSys or a library under /QSYS.LIB a "folder" is strictly speaking incorrect.

Here's a summary and comparison:

Filesystem Container Term Item Term Hierarchy Max name length
/QSYS.LIB library object single-level 10.6
/QDLS folder document nested 8.3
/QOpenSys directory file nested 255

Of course, from an IFS API viewpoint, they are all directories and files; but both QSYS.LIB and QDLS have their own native (non-IFS) APIs which don't use those terms. (In the case of QSYS.LIB, the term "file" is used, but to refer to a specific type of object, whereas for IFS every object is a file.)

The exception to my "generally" above is when it comes to the Windows-based GUI for remotely administering OS/400, "Navigator" (now "IBM Navigator for i", before that "iSeries Navigator", and before that "Client Access Navigator"). That application (and its documentation) uses the term "folders" even for directories and libraries, not just for QDLS folders. However, that's likely a sign of Windows influence, rather than being representative of OS/400's native terminology.

Windows

If we want to be pedantic about it – directories exist in the native Windows NT API, and the core (non-COM) Win32 API. Folders, by contrast, are implemented by the Windows Shell COM API (contained in SHELL32.DLL). From a programmer viewpoint, directories and folders are different things, because you use different APIs to manipulate them. A folder is a COM object, but not a kernel object; a directory is not a COM object, but it is a kernel object. In Windows NT, a directory is an object in the Windows NT kernel Object Manager (albeit, not a "Directory" object, rather a "File" object)–whereas folders are a purely user space concept within the Win32 environment subsystem, and the kernel knows absolutely nothing about them.

Now, it is true in many cases, a Shell folder corresponds one-to-one with a directory; but it doesn't have to. There are also "virtual folders" for which there is no corresponding filesystem directory – examples built-in to Windows include "Control Panel", "Printers", "Network Neighborhood", "My Computer". And if you create a Shell Namespace Extension – a DLL containing COM classes implementing the necessary Windows Shell COM interfaces, and the necessary registry entries to make Windows Shell load that DLL and instantiate those classes – you can even create your own virtual folders, to represent anything you like.

Windows Shell (SHELL32.DLL) was first introduced with Windows 95, and then ported to Windows NT as part of Windows NT 4.0. So, in Windows 3.x and Windows NT 3.x, officially speaking folders didn't exist yet, only directories. Some people may have used the term "folder" informally to mean a directory (e.g. in File Manager), or a Program Group (in Program Manager), but I'm not aware of any official Microsoft source (from that era) using the term.

OS/2

In OS/2 2.x and higher, the Workplace Shell (WPS) is conceptually quite similar to Windows SHELL32.DLL – the big difference being that instead of being implemented with COM, it is implemented with SOM.

However, there is a key terminological difference – what SHELL32.DLL calls "folders", WPS calls "containers". And while SHELL32.DLL has both "physical folders" (that correspond to directories), and "virtual folders" (that don't), to WPS only a physical folder is a "folder", whereas a "virtual folder" would be any container which is not a folder. Here's a table comparing their terminology:

Concept Windows Shell term Workplace Shell term
an entity represented by an icon "item" "object"
entity which contains other entities, represented by a window full of icons "folder" "container"
... which corresponds to a filesystem directory "physical folder" "folder"
... which doesn't correspond to a filesystem directory "virtual folder" (not aware of an official term, but any "container" which isn't a "folder")

(Source: I think this will become clear if you read the Workplace Shell Programming Guide against the Windows Shell Developer's Guide–although I'm not aware of any document that gives a direct comparison.)

Conclusion

So, as we see above, in some operating systems, the terms "directory" and "folder" have at least partially distinct meanings. But Windows and OS/2 draw a different (albeit related/overlapping) distinction between the two terms. And the OS/400 APIs (as opposed to the Windows-based administration GUI) uses the term "folder" in a completely different way, drawing a largely unrelated distinction between "directories" and "folders".

-2

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 concept, so file systems have some of it, but this is about the concepts.

The directory structure is tied to the hardware. A hard drive has a root directory and subdirectories. and files stored in them. At least originally. A folder is tied to a user interface. Not necessarily to a piece of hardware.

Why this is confusing is because the difference is rarely 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 user's start menu AND the content of default users (or everyone's) start menu. And as another example, your MyDocuments folder could have subfolders 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.

4
  • 3
    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
    Commented Jan 19, 2023 at 14:57
  • 2
    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
    Commented Jan 19, 2023 at 14:58
  • 1
    I always understood "folder" to be a GUI metaphor for a directory, rather than an abstraction. Commented Jan 20, 2023 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. Commented Feb 3, 2023 at 7:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .