8

I copy set of folders from server 1 to server 2. Amongst files I also have junction: folder with set of config files: on server 1 this junction points to... let's say c:\Config (that contains config1.cfg, config2.cfg)

On server 2 I also have c:\Config with the same set of files, but of course they contains their own settings that I do not want to overwrite.

So what I want to do is to copy junction AS-IS. Instead, I get copies of config1.cfg and config2.cfg from server 1 :(

How to solve this problem??

p.s.1. it's long to explain, but I cannot avoid of using junctions here (it has something to do with limitation of where configuration must be placed (subfolder-'junction' points to 'outside' folder))

p.s.2. OS is Windows Server 2003

Alexander
  • 1,152
  • 1
  • 16
  • 18
  • 1
    This isn't really a programming question. – Joel Coehoorn Nov 12 '09 at 17:37
  • 2
    Sorry, i was not aware that only programming-related questions could be asked on stackoverflow. However, i can see tons of questions here, that are not related to programming... So what you were going to say was 'Nobody will reply to you here, don't waste your time'. Right? If so - thank you very much! – Alexander Nov 13 '09 at 08:05
  • you can use 7zip with tar method, it will convert junction to symbolic, is it acceptable? please check https://superuser.com/questions/128969/symbolic-links-and-7zip/1534363#1534363 – netawater Jun 25 '21 at 03:24

2 Answers2

9

FastCopy is a small program that does.

Touth
  • 91
  • 1
  • 2
  • 2
    The junctions in the source are copied in the destination and point to the same original location. It doesn't convert to new junctions in the destination drive. – raisercostin Oct 18 '17 at 17:29
0

Copying junctions don't make any sense from drive to drive - a junction points to a specific node on disk. What you really want is a Symlink, which points to a specific path in the filesystem, but unfortunately this doesn't exist on Server 2003. You're out of luck here, you'll have to just fix this up in a post-copy script.

Ana Betts
  • 73,868
  • 16
  • 141
  • 209
  • 4
    I think he wants to copy the junction itself. So in other words to create a new junction that points to the same place as the old junction, instead of copying the junction target as a new folder. – tak Jul 04 '15 at 07:51
  • The problem is that symlinks will also create deep-copies by default... – xeruf Oct 18 '20 at 20:38