Folders is a language by User:Rottytooth where the program is encoded into a directory structure. All files within are ignored.
Folders relies on the hierarchical structure of directories to mimic that of a parse-tree. As a Folders program runs, variables are stored as another set of folders (each holding name, type, and value), this one in the user's appdata folder. Folders, as the most Windows of languages, opted to encode a C-style structure rather than something LISPier.
In version 2.0, a folder name-agnostic syntax (Pure Folders) is introduced; the code is entirely mapped to the nesting of folders themselves, allowing any names to be used (with the exception that they still are read in alphabetical order). Pure Folders sometimes requires many more folders to build programs, particularly when using strings. However, it better encapsulates the sense of a dematerialized language.
Commands are read in alphabetical order.
In Pure Folders, the number of folders within the first sub-folder are read as the type, command, or expression. The second and sometimes third folder are read as the content (in the case of If or While statements).
In Concise Folders, the folder names are read ignoring line numbers, " - Copy" at the end of a folder name or " - Copy (2)" etc are also ignored. For While and If statements, the first sub-folder is the condition, the following sub-folders are commands to be executed inside of the loop or conditional.
The number of folders in the first sub-folder determines the expression, type, or command:
|Command||# of Folders||Details|
|if||0 folders||Second sub-folder holds expression, third holds list of commands|
|while||1 folder||Second sub-folder holds expression, third holds list of commands|
|declare||2 folders||Second sub-folder holds type, third holds var name (in number of folders)|
|let||3 folders||Second holds var name (in number of folders), third holds expression|
|4 folders||Second sub-folder holds expression|
|input||5 folders||Second sub-folder holds var name|
|Type||# of folders||Details|
|Variable||0 folders||Second sub-folder holds var name|
|Add||1 folder||Second sub-folder holds first expression to add, third holds second expression|
|Subtract||2 folders||Second sub-folder holds first expression to subtract, third holds second expression|
|Multiply||3 folders||Second sub-folder holds first expression to multiply, third holds second expression|
|Divide||4 folders||Second sub-folder holds first expression to divide, third holds second expression|
|Literal Value||5 folders|
|Equal To||6 folders||Second and third folders hold expressions to compare|
|Greater Than||7 folders||Second and third folders hold expressions to compare|
|Less Than||8 folders||Second and third folders hold expressions to compare|
|Type||# of Folders|
Keywords can be replaced with the most common folder names in Windows:
Hello World using Pure Folders syntax
This example uses no semantic file names
Hello World using Concise Folders syntax
Here the "Hello, World!" output is split into four strings, which further obscures what this directory structure is for.
This example uses default names ("print", "while") instead of the alt names
Folders are barely considered content by Windows; right-mouse click on the largest Folders program and it's still 0 bytes. Try to check them in to GitHub and go through the ridiculous effort of adding .gitignores all over the place.
Since the Folders language can store data in foldernames, read and write to folders, and use folders for temporary storage as it runs, it can act as a parallel system, with its own data and its own concerns. For a tidy, nearly file-free OS, reorganize your C drive so that all your data storage is made up of a catacomb of empty folders.