Thread: Junction Points
View Single Post
Old 03-25-2008   #2 (permalink)
.Joe


Windows 7 RC
 
 

Re: Junction Points

Quote  Quote: Originally Posted by Dzomlija View Post
I had previously used a JBOD array of 3 hard disks to create a single volume in which to store all my music and videos. To make a long story short, I'm no longer using this JBOD array.

I still want to store my music and videos on these three drives, but when I use Media Player to add to the library, I only want to be able to specify one folder, but the scan must go across all three drives (drives H:, I: & J.

I want to store my primary library in "H:\Media", and have junction points directing to "I:\Music (Secondary)" and "J:\Videos".

It is my understanding that Junction Points can help. The question is, how to create a Junction Point?
Peter,

Found some gold for you. MKLINK command. Here's how it works in Vista:

The Mklink command
In order to use the Mklink command in Windows Vista, you have to open a command prompt in administrator mode. The easiest way to do so is
1. Click the Start button
2. Type CMD in the Start Search box
3. Press and hold down [Ctrl]+[Shift]+[Enter]
When you do, you will encounter a UAC dialog box and will have to respond accordingly.
When the Command Prompt windows appears, just type mklink and you will see the following syntax description:

MKLINK [[/D] | [/H] | [/J]] Link Target
Default is a file symbolic link
/D Creates a directory symbolic link.
/H Creates a hard link instead of a symbolic link
/J Creates a Directory Junction
Link specifies the new symbolic link name
Target specifies the path (relative or absolute) that the new link refers to
In this case, the default command (without any options) will create a symbolic or soft link to a file, which works very much like a shortcut in Windows XP.

For example, the command
mklink pad.exe notepad.exewill create a file symbolic link such that typing pad.exe will allow you to launch notepad.exe.

Using the /D option will create a symbolic or soft link to a folder, which also works like a shortcut in Windows XP. For example, the command
mklink /D c:\one c:\two\three\fourwill create a soft link, or a shortcut called one that points to the nested folder four.

The /H option will create a hard link rather than a soft link. The difference here is that instead of working like a shortcut, this hard link is more like renaming the file. For example, the command
mklink /H pad.exe notepad.exewill make the operating system treat pad.exe as if it is actually notepad.exe.

Finally, the /J option will create a hard link to a folder. This is also called a directory junction or junction point and instead of working like a shortcut to a folder, a hard link works more like a regular folder. For example, the command
mklink /J c:\one c:\two\three\fourwill make the operating system work with the long directory structure c:\two\three\four just as it were a single directory named c:\one.

When you're finished with any one of these types of symbolic links, you can terminate the link simply by deleting the link. For example, to terminate the one hard link, you'd simply delete the c:\one folder. However, since the link is terminated first and c:\one folder is actually empty, you needn't be concerned about data loss in the c:\two\three\four folder.

(source: snaked from techrepublic.com)
My System SpecsSystem Spec