Folders, Files and Paths: Understanding File System Organization

Every computer organizes data using a hierarchical file system consisting of files, folders (directories), and paths. Understanding these fundamental concepts is essential for effective computer use, whether you're managing personal documents, developing software, or administering systems. This guide explains how modern operating systems organize and locate data.

What Are Files?

A file is a named collection of data stored on a computer's storage device (hard drive, SSD, USB drive, etc.). Files contain information encoded in binary format—sequences of 1s and 0s that computers can read and process.

File Characteristics

How Files Are Stored

Physically, files are stored as sequences of bytes on storage media. The operating system's file system (NTFS, APFS, ext4, FAT32) manages how data is written to disk, tracks file locations, and handles fragmentation. When you open a file, the OS loads its contents from storage into RAM (memory) where applications can access and modify it.

File Types and Icons

Operating systems assign distinctive icons to different file types, providing visual cues:

What Are Folders (Directories)?

A folder (also called a directory in Unix/Linux terminology) is a container used to organize files and other folders into a hierarchical structure. Folders help manage thousands or millions of files by grouping related items together.

Folder Characteristics

Root Directory

Every file system has a root directory—the top-level folder from which all other folders branch:

Standard System Folders

Operating systems create standard folders for specific purposes:

Windows:

macOS:

Linux:

Special Folder Properties

Understanding Paths

A path is a string that specifies the unique location of a file or folder in the file system hierarchy. Paths allow users and applications to precisely reference files regardless of their position in the directory tree.

Absolute Paths

An absolute path (also called full path) specifies the complete location from the root directory to the target file or folder.

Windows examples:

C:\Users\John\Documents\report.docx
D:\Projects\Website\index.html
C:\Windows\System32\notepad.exe

macOS/Linux examples:

/Users/john/Documents/report.docx
/var/www/html/index.html
/home/john/.config/settings.conf

Relative Paths

A relative path specifies a location relative to the current working directory, rather than from the root.

Special symbols:

Examples:

./file.txt (current directory)
../parent_folder/file.txt (parent directory, then subfolder)
../../grandparent/file.txt (two levels up, then subfolder)

If your current directory is /home/john/projects/website/, then:

Path Separators

Different operating systems use different characters to separate directory levels:

Note: Most modern Windows applications accept forward slashes, making paths more portable across operating systems.

UNC Paths (Universal Naming Convention)

UNC paths access files on network shares, bypassing drive letter assignments:

\\ServerName\ShareName\Folder\file.txt
\\192.168.1.100\Public\Documents\report.pdf

UNC paths are commonly used in corporate networks for accessing shared folders on file servers.

URL-style Paths

Web browsers and some applications use URL-style paths with file:// protocol:

file:///C:/Users/John/Documents/report.docx
file:///home/john/documents/report.pdf

Navigating Files and Folders

Graphical File Managers (GUI)

Common operations:

Command-Line Navigation

Windows Command Prompt/PowerShell:

cd C:\Users\John\Documents    # Change directory
dir                            # List directory contents
mkdir NewFolder                # Create directory
rmdir OldFolder                # Remove directory
copy file.txt D:\Backup\       # Copy file

macOS/Linux Terminal:

cd /home/john/documents        # Change directory
ls                             # List directory contents
ls -la                         # List with details and hidden files
mkdir new_folder               # Create directory
rmdir old_folder               # Remove empty directory
rm -r folder_with_content      # Remove directory and contents
cp file.txt /backup/           # Copy file
mv file.txt /new/location/     # Move file

Wildcard Patterns

Both GUI and command-line interfaces support wildcards for batch operations:

File System Organization Best Practices

Special Considerations

File and Path Length Limits

Illegal Characters in Filenames

Windows prohibits: \ / : * ? " < > |

Unix/Linux/macOS: Only / and null character are prohibited, but avoid : * ? " < > | for cross-platform compatibility

Case Sensitivity

Advanced Concepts

Symbolic Links (Symlinks)

Symbolic links are special files that point to other files or folders, allowing multiple paths to reference the same data:

Hard Links

Hard links create multiple directory entries pointing to the same physical data on disk. Deleting one hard link doesn't affect others until all links are removed.

Mount Points

In Unix-like systems, storage devices and partitions are "mounted" to specific directories in the file tree:

/mnt/usb_drive
/media/username/External_HDD

Understanding files, folders, and paths is foundational to computer literacy. Whether you're organizing personal documents, managing projects, or administering systems, mastering file system navigation and organization principles will dramatically improve your efficiency and effectiveness in digital environments.