Windows filesystem

· Windows · #note/sink · #sys/health · #sys/network ·

Windows URI scheme

Format

A file URI has the format
file://host/path
where host is the fully qualified domain name

Number of slash characters

Examples

in Windows

file://localhost/c:/WINDOWS/clock.avi
file:///c:/WINDOWS/clock.avi the URI as understood by the Windows Shell API
file://hostname/path/to/the%20file.txt for a network location
file:///c:/path/to/the%20file.txt local file, the hostname is omitted, but the slash is not (note the third slash)
\\.\c:\path\to\the file.txt will work for local files, but not shares on the local system
\\?\C:\Test\Foo.txt skip path normalization (?)
\\.\Volume{b75e2c83-0000-0000-0000-602f00000000}\Test\Foo.txt GUID identificator for a volume
\\.\UNC\LOCALHOST\c$\temp\test-file.txt

for files and folders

REM list any type of link inside current directory
dir /al

aka Junctions / reparse points
for folders

REM create junction
mklink /J <filename> <filename>

REM query and delete
fsutil reparsepoint query <filename>
fsutil reparsepoint delete <filename>

for files