Persistent Hard Links

J

jeff

How do you create persistent hard links in Windows?

What I want:
I want to have multiple directories contain links to a single file, and
retain those links even when the file is changed or moved. (Using
shortcuts is undesirable because I want these links to be transportable
from system to system.)

What I know:
I've figured out that "hard links" are what I think I want, and I've
figured out several ways to create them, e.g.
C:\> fsutil hardlink create newfilename existingfilename
....and several other programs to make hardlinks in Explorer, etc.

And I know that when I use any of the above, the hardlink was created,
because (a) when I hardlink a large file, the hard disk memory used
doesn't change, and (b) I can use C:\>hlscan /dir C: which tells me
that the hardlink exists.

The Problem:...(grr...)
After I've created a new hardlink to a file, I open it, and change it.
Say, add some lines. Now, according to the Windows fsutil documentation
and all the postings I've found, the other file should have the same
changes. But here's the rub: not only doesn't it have the same changes,
it isn't even hardlinked anymore!

EXAMPLE:
C:\> type a.txt
Hello
C:\> fsutil hardlink create b.txt a.txt
Hardlink created for C:\b.txt <<===>> C:\a.txt
C:\> edit b.txt
(make some changes...)
C:\> type b.txt
Hello there
C:\> type a.txt
Hello


What is going on?!?

Thanks,
Jeff
 
J

jeff

OK, I think I figured it out. My text editor was breaking a file's hard
links when saving. Changed the setting, and voila, it works fine. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top