A directory or folder is a virtual container within a digital file system, in which groups of computer files and other directories can be kept and organized.
A typical file system may contain thousands (or even hundreds of thousands) of directories. Files are kept organized by storing related files in the same directory. A directory contained inside another directory is called a subdirectory or child of that directory. Together, the directories form a hierarchy, or tree structure.