• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Windows Symbolic Link Question

benwood

Member
Is it possible to write a command creating a symbolic link between two directories when the target directory already exists? For example the command "mklink /D /J Aliens G:\SciFi" would create the NTFS junction point "Aliens" in the "G:\SciFi" directory. But the "Aliens" directory already exists in the G:\SciFi directory but it's empty. I need to do this because I have a PC acting as a media server where I store all my DVD and music rips. I access this media server via the Patriot Box Office (PBO) hardware media server that only supports NTFS junction points but not any other kind of symbolic link.
 
Why must the directory exist already? You cannot create a junction or symlink when a directory (or link/junction) of the same name exists already.
 
Why must the directory exist already? You cannot create a junction or symlink when a directory (or link/junction) of the same name exists already.
This. You're going to need to delete the directory before you create the SymLink/Junction.
 
Why must the directory exist already? You cannot create a junction or symlink when a directory (or link/junction) of the same name exists already.

I had already created the empty directories needed in anticipation of using junction points. Under Windows XP the program NTFSLink allowed you to do this. My media server now runs Windows 7 Home Premium and the program NTFSLink no longer works with it. So I'm going to have to delete all of the empty directories and recreate them via the mklink coomand? Also since I have a lot of mklink command to issue, is there a way to write all the mklink commands as a script? I know nothing about scripting.
 
I had already created the empty directories needed in anticipation of using junction points. Under Windows XP the program NTFSLink allowed you to do this. My media server now runs Windows 7 Home Premium and the program NTFSLink no longer works with it. So I'm going to have to delete all of the empty directories and recreate them via the mklink coomand? Also since I have a lot of mklink command to issue, is there a way to write all the mklink commands as a script? I know nothing about scripting.

Are you trying to mirror a directory structure on another drive? If so, just loop through all existing directories that have no children and replace them with junction points.
 
Are you trying to mirror a directory structure on another drive? If so, just loop through all existing directories that have no children and replace them with junction points.


Thanks for the advice. What I'm trying to do is to have one copy of the same DVD rip appear under two different directories, not mirror the directory structure of another drive.
 
Back
Top