When you omit the backslash at the beginning of a path (or after a drive letter), the path is considered relative to the current directory. You can get the value of the current directory using the System::IO::Directory::GetCurrentDirectory() method, and you can change it using the System::IO::Directory::SetCurrentDirectory(path) method.
To clarify this, note: if the current directory is C:\Windows , the path C:test.txt equivalent to C:\Windows\test.txt .
GetDirectories method returns all directories in the specified path, even hidden or system directories (which you usually do not see in Windows Explorer). Therefore, I think you are talking about system directories in other drives, such as System Volume Information and $RECYCLE.BIN .
Itβs good to note that in the Windows shell (cmd.exe) we can have separate current directories for each drive. At startup:
C:\Windows\System32> cd d:\Temp C:\Windows\System32> dir c:
you get the contents of C:\Windows\System32 , and then at startup:
C:\Windows\System32> dir d:
you get the contents of D:\Temp
source share