Filesystems

NTFS

ReFS

Reparse Points


Files, directories and volumes

Windows (like many other) file systems organize data on hard disks and devices with the concept of files and directories.
In addition, Windows supported file systems also have the concept of volumes. A volume is a container for a file system.

Paths

A path consists of a series of directory names that optionally ends with a file name. The directory and file names are separated by a back slash:
\dirOne\dirTwo\dirThree\filename.ext

The WinAPI I/O functions convert a forward slash to back slash except when the special \\?\ prefix is used.

Maximum length of path names

See also the value of LongPathsEnabled under the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

Reserved file names

Some file names are reserved and cannot or should not be used for actual files:

These names should not be used even with an extension such as NUL.txt.

Prohibited characters in file names

The following characters are not allowed in file and directory names:

Determining free and used space on local file systems

A quick way to determine the free and used space on local file systems with PowerShell is

Get-PSDrive -PSProvider FileSystem

Alternatively, it can also be queried with

Get-WmiObject -Class win32_logicalDisk |`
  Select-Object `
     deviceId,`
     @{L=' Free (GB)';E={"{0,10:N1}" -f ($_.freeSpace /1GB)}},`
     @{L='Total (GB)';E={"{0,10:N1}" -f ($_.size      /1GB)}}

Determining file system type

The file system type (for example NTFS or FAT32 can be determined with fsutil.exe)

Showing drives on the command line

wmic logicaldisk get deviceid,volumename

See also

The command line (cmd.exe, PowerShell) programs convert.exe, diskpart.exe, format.com, fsutil.exe

Directories

The cmd.exe command vol

The .NET classes System.IO.FileSystemInfo, System.IO.DirectoryInfo and System.IO.FileInfo

(Get-Counter '\FileSystem Disk Activity(*)\FileSystem Bytes Read').counterSamples
(Get-Counter '\FileSystem Disk Activity(*)\FileSystem Bytes Written').counterSamples
(Get-Counter '\LogicalDisk(*)\% Free Space').counterSamples