NTFS Junction Points allow you to graft a target folder on another NTFS folder and 'mount' a volume onto an NTFS Junction Point.
This effectively eliminates the 26 drive letter limitation.
NOTE: Junction Points are transparent to programs.
Microsoft provides 3 programs for creating and manipulating NTFS Junction Points:
Mountvol.exe is installed from the Windows 2000 CD-ROM. It is used to:
- graft the root folder of a local volume into a Windows 2000 folder.
- Display the target of an NTFS Junction Point used for mounting a volume.
- List local file system volumes available for use.
- Delete volume mount points created with mountvol.exe.
Linkd.exe from the Windows 2000 Resource Kit. It is used to:
- Graft a target folder onto a Windows 2000 NTFS folder.
- Display the target of an NTFS junction point.
- Delete NTFS Junction Points created with Linkd.exe.
Delrp.exe from the Windows 2000 Resource Kit is targeted at developers creating reparse points, the underlying objects of junction points.
When you type Mountvol at a CMD prompt:
Creates, deletes, or lists a volume mount point. MOUNTVOL \[drive:\]path VolumeName MOUNTVOL \[drive:\]path /D MOUNTVOL \[drive:\]path /L path Specifies the existing NTFS directory where the mount point will reside. VolumeName Specifies the volume name that is the target of the mount point. /D Removes the volume mount point from the specified directory. /L Lists the mounted volume name for the specified directory. Possible values for VolumeName along with current mount points are: \\?\Volume\{1c1caff3-e133-11d3-8316-806d6172696f\} C: \\?\Volume\{4339ff74-e175-11d3-84ab-0020e0616054\} D: \\?\Volume\{1c1caff2-e133-11d3-8316-806d6172696f\} E: \\?\Volume\{1c1caff1-e133-11d3-8316-806d6172696f\} A:\NOTE: The string after Volume is the Globally Unique IDentifier ( GUID) which is used to identify a unique volume, even if the drive letter changes.
To mount your CD-ROM onto an NTFS Junction Point:
md cdrom
mountvol cdrom \\?\Volume\{1c1caff2-e133-11d3-8316-806d6172696f\}\
To display the contents of your CD-ROM, type: dir cdrom
Volume in drive C has no label. Volume Serial Number is E062-F0D6 Directory of C:\cdrom 12/07/1999 08:00 45 AUTORUN.INF 12/07/1999 08:00 <DIR> BOOTDISK 12/07/1999 08:00 5 CDROM_IP.5 12/07/1999 08:00 5 CDROM_NT.5 12/07/1999 08:00 <DIR> DISCOVER 12/07/1999 08:00 <DIR> I386 12/07/1999 08:00 16,490 READ1ST.TXT 12/07/1999 08:00 233,472 README.DOC 12/07/1999 08:00 196,880 SETUP.EXE 12/07/1999 08:00 <DIR> SETUPTXT 12/07/1999 08:00 <DIR> SUPPORT 12/07/1999 08:00 <DIR> VALUEADD 6 File(s) 446,897 bytes 6 Dir(s) 0 bytes freeTo delete it:
mountvol cdrom /D
NOTE: The cdrom name in the above example is any character string you wish.
To mount the D: drive onto an NTFS Junction Point on your C: Drive:
MD Ddrive
mountvol Ddrive \\?\Volume\{4339ff74-e175-11d3-84ab-0020e0616054\}\
To display the contents of your D: Drive:
dir Ddrive
To create an NTFS Junction Point to your desktop:
linkd YourDeskTop "<Your Profile>\desktop"
NOTE: <Your Profile> can be the path or %UserProfile%.
NOTE: Microsoft strongly recommends:
"Use NTFS ACLs to protect junction points from inadvertent deletion.
Use NTFS ACLs to protect files and directories targeted by junction points from inadvertent deletion or other file system operations.
Never delete a junction point using Explorer, a del /s command, or other file system utilities that walk recursively into directory trees. These utilities will affect the target directory and all subdirectories. Instead, use the utilities described below to delete junction points.
Use caution when applying ACLs or changing file compression in a directory tree that includes NTFS Junction Points.
Do not create namespace cycles with NTFS or DFS junction points.
Place all your junction points at a secure location in a namespace where you can test them out in safety, and other users will not mistakenly delete them or walk through them."