3
I have a file at D:\JavaScript\CheckIban.js
, and I want to reuse it in many places without duplicating it. Because when I fix a bug (change its content) I need that change to be propagated to all files. Using links my plan is to change one instance of the hardlinks, and expect other instances to be updated automatically.
Now, let's say that I've create a hardlink to this file using:
mklink /H D:\Projects\Crm\Site\Scripts\CheckIban.js D:\JavaScript\CheckIban.js
and I get the success message that the hardlink is created for ...
However, when I open each file and change it, the content of the other file is not changed. What do I miss here?
Notes: I can't use soft links, because I'm using a program (TFS) that doesn't support working with soft links.
Use
fsutil hardlink list D:\JavaScript\CheckIban.js
to verify that the hard link still exists. – Chirag Bhatia - chirag64 – 2015-04-29T06:23:04.480@Chirag64, I ran that command and only the file itself got listed. What might be wrong? – Saeed Neamati – 2015-04-29T06:43:34.463
The command is correct, you are sure that the folder you have chosen is correct? There is nothing odd about the target folder? The file doesn't already exist in the target location? A permissions issue? Have you tried running the command from an admin cmd prompt? – Julian Knight – 2015-04-29T07:37:40.013
1Actually the target is not a folder, it's a file. And yeah, I did everything right. File doesn't exist (I do it manually and delete it before recreating), no permission issue because I'm admin and cmd is run under admin permissions, otherwise mklink would throw error. – Saeed Neamati – 2015-04-29T08:09:01.460
@SaeedNeamati Did you ever figure this out? I've got the same stupid issue... – Nick Spreitzer – 2017-03-16T00:32:07.610