Make a hard link without extra programs in Windows 7

My objective here is to synchronize my emule credit file (application.dat?) by Dropbox. But the credit file is not inside the Dropbox directory (by default). So I want to make a hard link to get this objective done.

I know I can make a hard link by Perl in Windows. (I learnt Perl in Windows XP. Only hard link is valid in Windows XP.) But it sounds like overkilling to me to make that done by installing new software, as I expect I am not going to use Perl in the near future.

Any ideas? The simpler, the better.


Solution 1:

You can use the mklink command like :

mklink /H <link> <target>

I guess that should work, but I don't know what would happen if you use eMule on the same time at two different locations regarding the syncing.

If you want to link to a directory instead of a file, use the following command:

mklink /J <link> <target>

Note: This will create a junction rather than a symlink. Junctions are for when the target and source are not on the same volume.

Solution 2:

Ways to make a hard link — not solely confined to Windows 7:

  • the ln command from Microsoft's own downloadable SFUA utility toolkit which runs on the Subsystem for UNIX-based Applications that comes in the box with Windows 7 Ultimate edition and Windows Server 2008 R2. (For Windows XP, one can download and install Services for UNIX version 3.5.)
    ln original new
    ln original1 original2 ... directory
  • JP Software's TCC/LE has a built-in MKLINK command and a built-in MKLNK command. The latter automatically chooses between hard and symbolic links and can use wildcards to make a lot of hard links all at once. It's syntax is also more like that of ln, which Linux and Unix people may be used to, than mklink's syntax is.
    mklink /h new original
    mklnk original new
    mklnk *.txt directory
  • fsutil (using its hardlink option)
    fsutil hardlink create new original
  • mklink
    mklink /h new original
  • Using FAR, press Alt-F6

Solution 3:

I find this shell extension really useful, no ads or anything, very light. I suppose it is third party software, but it integrates into windows, so it is as close as it gets to native support. I figured that was what you wanted anyway, a native feel, no frills. http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html#download