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,
A folder is not necessarily a physical directory on a disk. It can be, for example, the printers folder or control panel folder in Windows.
Raymond Chen explains:
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.