Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista file management

Vista - Junction Points

Reply
 
Old 03-25-2008   #1 (permalink)


Windows Vista x64 Ultimate
 
 

Junction Points

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?

My System SpecsSystem Spec
Old 03-25-2008   #2 (permalink)


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
Old 03-25-2008   #3 (permalink)


Windows Vista x64 Ultimate
 
 

Re: Junction Points

Quote  Quote: Originally Posted by .Joe View Post
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)
Thanks, I'll give it a go. I suppose I'll have to figure out first which of the options provides the best solution
My System SpecsSystem Spec
Old 03-25-2008   #4 (permalink)


Windows Vista x64 Ultimate
 
 

Re: Junction Points

Thanks .Joe!

The MKLINK /J "Name" "Target" worked great. Just tried it out now, then ran a "DIR /s" in the folder in which I created the link (to an entirely different drive). Listing showed the contents of the contents of all the folders.

Great stuff.
My System SpecsSystem Spec
Old 03-25-2008   #5 (permalink)


Windows 7 RC
 
 

Re: Junction Points

Quote  Quote: Originally Posted by Dzomlija View Post
Thanks .Joe!

The MKLINK /J "Name" "Target" worked great. Just tried it out now, then ran a "DIR /s" in the folder in which I created the link (to an entirely different drive). Listing showed the contents of the contents of all the folders.

Great stuff.
Peter,

Glad to be of service. Ask me anytime if you need help. I'm not a guru, but a guru IT (in training)
My System SpecsSystem Spec
Old 03-25-2008   #6 (permalink)


Windows Vista x64 Ultimate
 
 

Re: Junction Points

Quote  Quote: Originally Posted by .Joe View Post
Quote  Quote: Originally Posted by Dzomlija View Post
Thanks .Joe!

The MKLINK /J "Name" "Target" worked great. Just tried it out now, then ran a "DIR /s" in the folder in which I created the link (to an entirely different drive). Listing showed the contents of the contents of all the folders.

Great stuff.
Peter,

Glad to be of service. Ask me anytime if you need help. I'm not a guru, but a guru IT (in training)
Yeah well, "No matter how good you are, there's always someone better", and right now, that's you. What other useful nuggets are hidden away in the command-line of Vista?
My System SpecsSystem Spec
Old 03-25-2008   #7 (permalink)


Windows 7 RC
 
 

Re: Junction Points

Quote  Quote: Originally Posted by Dzomlija View Post
Quote  Quote: Originally Posted by .Joe View Post

Peter,

Glad to be of service. Ask me anytime if you need help. I'm not a guru, but a guru IT (in training)
Yeah well, "No matter how good you are, there's always someone better", and right now, that's you. What other useful nuggets are hidden away in the command-line of Vista?
/nugget :gofast - makes your PC 50% faster
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
F-secure and junction points Vista security
Need to restore junction points Vista file management
help with junction points Vista General
on NTFS junction points Vista account administration
junction points Vista account administration


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46