Equivalent root folder in windows

The C kernel is considered the root folder in windows when it says: \ folder1 \ folder2 \ in linux and windows C: \ folder1 \ folder2.

+4
source share
10 answers

On Windows, this is relative to which drive your current working directory is on. If your current directory is in drive C, then C: \ will be the root. If the current directory is drive D, then D: \ will be the root. There is no absolute root.

+11
source

At the file system level, the Win32 API does not have a root folder, but as others point out, the Shell API , i.e. desktop. The Shell namespace is browsed with a (graphical) shell, which appears to be Explorer.exe.

At a much lower level, the Windows kernel also has a root folder, and the registry and file system are subfolders. This is true if you are writing a device driver. The Object Manager namespace can be viewed using the WinObj tool.

+10
source

If you are using Windows CE, then \ is the root directory. It resembles a Unix / root directory. This is the only kind of Windows where you can get a simple answer to your question.

If you are using Windows NT / 2000 / XP / 2003, the closest equivalent is the section containing the NTL files; DR, NTDETECT.COM, BOOT.INI and BOOTFONT.BIN. The BIOS and MBR will find this partition by finding on which drive the boot, MBR scan, and search for the active partition are started. Microsoft calls this system partition. I'm not quite sure how the program can find which section it was. In any case, when you discover which drive letter is, say, the letter L, you can say that L: \ is the root directory. In 99% of cases, this will be the drive letter C :.

Also, if you use Windows NT / 2000 / XP / 2003, you also have a section that contains Windows system files, such as the \ Windows directory or others. Microsoft calls this boot partition. You can get the drive letter from the% SystemDrive% symbol, as someone else said. If this is the drive letter Q, you can say that Q: \ is the root of the system drive.

If you use Vista, then things get more complicated. If you installed the DVD boot, the boot partition (containing the system files) is C: and your system partition (containing the boot files) is D: if they are not the same partition, then the partition is C :. But if you found that Windows is already running, insert the DVD and run the installer under this Windows installation, then the drive letters can be almost any.

In Windows 95/98 / ME, BIOS and MBR will search for IO.SYS, COMMAND.COM, and some others in the active section. This usually gets the drive letter C: so the root partition will be C :. As always, Windows system files can be installed in the \ Windows directory or others on any partition.

Some people talk about the desktop. Of course, every registered user has a desktop. This is similar to every Unix user home directory. It is not a root directory.

Addendum: in the second paragraph, about Windows 95/98 / ME, I typed "so the root partition will be C :." That is, the letter C, a colon, a backslash, and then a period for the end of the sentence (and not part of the directory name). When viewing a page, a backslash is not displayed. But when editing this answer to add this addition, the backslash is there exactly as it should be, just like I typed it.

+8
source

On Windows, you do not have a special root node, instead you have an entry point to the file system in the form of environment variables:

% Appdata%

% ProgramFiles%

% CommonProgramFiles%

% System Drive%

% SystemRoot%

the best root equivalent might be% SystemDrive%, even if the concept of root does not match the context in the windows.

+6
source

Windows does not use the UNIX root folder concept. Instead, each partition or device with a file storage has its own root folder. Given that the C / partition () section is almost always home to the operating system, you can consider your root folder to be the same for Windows.

+4
source

As already mentioned, Windows differs from UNIX, where file systems have one logical β€œpath” for all devices (each device is mounted in this space, for example, on / dev / floppy).

In Windows, each device (whether it is a hard disk partition, CD / DVD Rom, or flash drive) has its own logical path space embedded in the \ "directory of its logical drive letter.

While Windows Explorer does the half-and-half job of organizing all the disks under "My Computer", this is pure UI sugar, and there is no way to get another from one drive letter through relative paths.

Each individual disk file system behaves similarly to UNIX and has a root named "\".

+4
source

On Windows, the root folder will be the desktop. Desktop-> computer-> C: \ folder1 \ folder2 with the IShellFolder interface.

+1
source

Unix uses the file system to represent almost all parts of the system from top to bottom, which means that the root file system logically also represents the "system root". But on Windows, the file system is not so deeply attached to the system, so there is no concept of a "system root" in the file system. Hugh explains this in more detail.

+1
source

yes, "\" is the root folder of the current drive. For instance. The DOS command "cd \" changes the current directory to the root folder, or "cd \ folder1 \ folder2" goes to "c: \ folder1 \ folder2"

0
source

In fact, windows have a root folder. The folder, although not visible, is called "i386"

-1
source

Source: https://habr.com/ru/post/1277307/


All Articles