In this article, I will explain the basic Windows concepts of files and folders. While you may already know these basic Windows concepts or fundamentals of operation, Microsoft themselves have been changing or redesigning certain things for little to no improvement in ease of use or usability. So it’s time to revisit the basics.
Files and folders are managed in Windows Explorer (now called File Explorer after Windows 8). It is the core program in Windows which also houses the user interface.
Every disk connected to a computer has a file system that organizes and controls how data is stored. For Windows, the file system today is NTFS. For non-NT versions in the past, it was FAT16 or FAT32. You can check the file system of a disk by right clicking it in This PC and choosing Properties from the context menu.
File names and extensions
Every file on the Windows NTFS file system can have a file name and a file extension to identify its file type. The filename and the extension are separated by a period / dot (.) e.g. My file.txt. The NTFS file system is case-preserving (stores the correct case – capitals or small letters) but does not require typing the correct case in its path to access it. File names can contain any Unicode character except some reserved characters which cannot be used. These include < > : ” / \ | ? * and some other characters and names. Due to Explorer Shell limitations, folder names cannot end with a dot (.)
Windows makes it easy to browse and access files and folders visually with mouse clicks or keyboard navigation. But it does so by accessing the item’s path behind the scenes. Think of a path as a road to what you want to access on the disk and the icon as its doorway. Every file or folder has a unique path.
A local path can begin with a disk drive letter followed by a colon and backslash and is followed by directory or file names, each of them separated by a backslash. e.g. C:\Windows\Notepad.exe. Network paths in Windows begin with double backslashes followed by the Computer Name and Network share name separated by backslashes. e.g. \\MyLaptop\Desktop\Some File.txt. Some other protocols such as the file protocol may use front slashes. e.g. file://C:/Windows/notepad.exe.
To access paths with long file names from the command line, it’s a must to enclose them in double quotes.
A file stores the actual data, and associated metadata. A folder is used to organize files. A file is associated with a default program or a default app. Only then it opens in that app when double clicked or by pressing Enter on the keyboard. You can open a file in a non-associated app by right click, drag and drop or the command line.
Windows can set permissions based on user accounts or groups on any Windows resource or object. Files and folders are considered objects as are network shares, Registry keys, processes, threads, services and many other resources. Each object has a Security descriptor which specifies permissions and an owner. Permissions can be explicitly applied to an object or inherited from a parent object. These can be set at a very granular level. For the NTFS file system, Explorer and other command line tools, cacls, xcacls, icacls, subinacl can change or set permissions.
On the NTFS file system, certain properties and metadata about the file are stored. One of them are Attributes. There are some hidden attributes for files and directories, but Explorer and the Command Prompt recognize 7 attributes: the four basic attributes: Archive (A), System (S), Hidden (H), Read-only (R), supported since the days of MS-DOS and Windows 9x. There are three additional NTFS-specific attributes introduced as new versions of Windows came out: Compressed (C), Encrypted (E) and Content-Indexed (i). Except for the System attribute, you can change these for any file or folder by right clicking it and choosing Properties. The General tab of Properties lists changeable attributes.
Metadata, in simple words, is just extra data that is stored in the file in addition to the main data. For example, a document may contain special fields such as Title, Subject, Tags, Comments, Author names, Last saved by, Revision number and lots of other details. A picture file will contain Rating, Tags, Date taken and so on.
Windows lets you view and edit this metadata from File Explorer. Select a file and you will be able to check its metadata on the Details pane. If you are not sure the Details pane is visible press, Alt + Shift + P to toggle it.
You can also right click a file and choose Properties. Then go to the Details tab to see the metadata stored in it. From there you can also remove the stored metadata if you don’t want this information to be visible when sharing the file.
Folders (also called directories) can be used to organize items by grouping them together. The file system includes a large hierarchy of folders.
You can create a new folder by right clicking in the empty area of any existing file system folder or the Desktop and choosing New… Folder from the context menu. The keyboard shortcut Ctrl + Shift +N can also be used for creating a new folder.
Windows comes with pre-defined folder locations for storing files in an organized way. For files created by the user, there are special folders called Documents, Pictures, Music, Videos, Downloads, Desktop and Contacts.
For files created by the system, there is the C:\Windows folder and many subfolders under it. Files installed on your disk to make an app work properly are located in C:\Program Files (for 64-bit apps for all users) or C:\Program Files (x86) for 32-bit apps for all users. There is also the AppData folder located at C:\Users\<your user name>\AppData (for installing apps only for the currently logged in user). If app settings are stored outside of the Registry, there are AppData (per-user) and C:\ProgramData (all users) folders where apps are supposed to store them.
There are also virtual folders in Windows. They are named so because their contents are not actually stored as files on the file system but instead in the Registry. Explorer makes them appear as files, shortcuts or folders. This PC, Network, Network Connections, Control Panel, Libraries, Devices and Printers are some examples of virtual folders.
Windows is an extremely complex operating system that has evolved for several decades with too many concepts to be explained in one article but these are the basic ones a novice user needs to know about files and folders.