I have a directory 'dir1' with some files in it and a directory 'dir2' where I'll add some files. How can I create a link/junction (or just connect them)? I tried "mklink /D (or /J) dir1 dir2" but apparently it's not working and if it would I think that dir1 would just be dir2. I want dir1 to have the files it has now and when I add files to dir2 to show up in dir1.
mklink /D (or /J) dir1 dir2
I have a directory 'dir1' with some files in it and a directory 'dir2' where I'll add some files.
You have the directories the wrong way around. You also need to remove dir2 before creating the link.
The syntax for
MKLINK [[/D] | [/H] | [/J]] Link Target
mklinkcreates the link so
dir2should not exist before you run the command.
In your case
dir2 will be the new link and
dir1 will be the target, so you need to use:
mklink /d dir2 dir1
mklink /j dir2 dir1
dir2 has the files of
dir1 (In other words
dir1). I don't want that.
That's what directory links are designed to do.
You need to rethink.
One option is to add the files to
dir2 and then when in
dir1 create symbolic link to the files in
dir2. You can do this with:
cd dir1 mklink file \full\path\to\dir2\file
You have to do this for every new file added to