Any topic that does not fit into the other categories.

Moderators: usdcs, Andrew Lee, webfork

Message
Author
spicydog
Posts: 262
Joined: Mon Mar 16, 2009 11:56 am

Can anybody please suggest me how to make hardlinks and/or symbolic links and/or junctions on XP Pro SP3 32-bit local NTFS disk?

Important: I need to do that for a file (not for a folder) and that the link and the file have to be on the same disk but on different partitions.

Thanks

dany
Posts: 70
Joined: Fri Jun 17, 2011 10:26 pm
Location: netherlands

Code: Select all

fsutil hardlink create c:\foo.txt c:\bar.txt
Where foo.txt is the hardlink and bar.txt the file to be linked to. Try it, I'm not sure if it will work across different partitions though.
Junctions only work with directories and afaik symlinks are only available from Vista and up.
Alternately, maybe NTFS Link could be what you're looking for.
GFA/P/S/SS\$/O d- s: a>? C++ UL++++ P++@ L++ !E W+++ N++@ o K+ w O M V- PS+++ PE Y+ PGP++>+++ t++ 5+ X++@ R !tv b+>++ DI++ D+ G e+++ h-->- r% y+

spicydog
Posts: 262
Joined: Mon Mar 16, 2009 11:56 am

I like fsutil.exe a lot, but the unfortunate limitation of that powerful tool is that the new link and the existing file must be on the same volume

linkd.exe (part of Windows Resource Kit Tools) is another interesting tool (that permits to create/manipulate NTFS junction points across partitions) but it handles only folders.

So I thought to combine fsutil.exe and linkd.exe (I suppose that you can imagine how)... Unfortunately it did not work as I expected... But I did not give up yet

I have also tried NTFS Link v.2.1 (dank je wel voor de tip) but -besides having experienced a nasty crash- it does not appear to handle files but only folders.

BTW, the reason why I mentioned them all (hardlinks, symlinks and junctions) is that -generally speaking- there is plenty of overlapping in the terminology and I thought to purposely gather an unrestricted feedback in this thread.

In elk geval bedankt voor de moeite

lautrepay
Posts: 700
Joined: Sat Mar 26, 2011 2:31 am

SD, if you have .net 3.5 installed, there's a little and effective tool to create symbolic links, hard links and junctions: Symlinker.
A portable version is available.
Note that hard links can only be created in the same partition and when you delete the link you delete the original file or folder.

spicydog
Posts: 262
Joined: Mon Mar 16, 2009 11:56 am

Thanks lautrepay

Since I do have .net 3.5 installed and I liked the idea of a simple tool (only 86 KB) able to quickly create files and folders symlinks I have already tried Symlink Creator v.1.1.1.3 despite what I read on the page of Alejandro Mora Díaz:

"This application needs .Net Framework 3.5 to run (SP1 recommended) and as of 7/26/2010 this software will only work under Windows Vista or 7, Windows XP doesn't have the mklink command inside the cmd.exe app. I'll look for a workaround for this, but it isn't promising that I will find it..."

I guess that I was really hoping the latest version would include support for XP... Strange enough the entire procedure can be followed and after clicking the "Creale Link" button the "Link successfully created" screen even pops up... But in the reality no link is created

I also tried HardLinkShellExt v.3.6.5.1, which handles nicely both files and folders (directly from the Explorer context menu) but sadly only on the same volume

Thanks anyway for your suggestion and have a nice weekend.

lautrepay
Posts: 700
Joined: Sat Mar 26, 2011 2:31 am

spicydog wrote:Thanks lautrepay

Since I do have .net 3.5 installed and I liked the idea of a simple tool (only 86 KB) able to quickly create files and folders symlinks I have already tried Symlink Creator v.1.1.1.3 despite what I read on the page of Alejandro Mora Díaz:

"This application needs .Net Framework 3.5 to run (SP1 recommended) and as of 7/26/2010 this software will only work under Windows Vista or 7, Windows XP doesn't have the mklink command inside the cmd.exe app. I'll look for a workaround for this, but it isn't promising that I will find it..."
Ooops...
Sorry, SD. I didn't noticed this limitation of XP.
It seems that XP only supports junctions points, which are similar to hard links, but they only can be created in the same volume, so I don't think you can create a junction point across partitions. And you have to be careful when deleting them.
There's a Systenals Suite tool for that purpose: Junction
lautrepay wrote:Thanks anyway for your suggestion and have a nice weekend.

For you too, thanks.

spicydog
Posts: 262
Joined: Mon Mar 16, 2009 11:56 am

Thanks again lautrepay

Yes, I know Junction (very nice tool) but unfortunately it only handles folders and not files

BTW, does anybody know what Junction (147 KB) does more than linkd.exe* (11 KB)? My first impression is that they seem to cover the exact same area.

*(part of Windows Resource Kit Tools)

As I mentioned in my previous post I also tried HardLinkShellExt, which works fine for both files and folders but only on the same volume... So it would appear that XP does indeed support hard links but (until now) I did not find any tool to create them on different partitions... I seriously hope that this is not a dead end

PS: lautrepay THANKS again for the tip you gave me about bundle.exe... I used it a few times and with its 304 KB it seems to do quite a nice job!

SYSTEM
Posts: 1743
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

spicydog wrote:Can anybody please suggest me how to make hardlinks and/or symbolic links and/or junctions on XP Pro SP3 32-bit local NTFS disk?

Important: I need to do that for a file (not for a folder) and that the link and the file have to be on the same disk but on different partitions.

Thanks
Sorry, it is impossible.

Hard links don't work across different partitions.

Junction points can only point to directories.

Finally, symbolic links were introduced with NTFS 6.0 and Windows Vista. Windows XP can't even read them, let alone creating.
My YouTube channel | Release date of my 11th playlist: January 26, 2018

spicydog
Posts: 262
Joined: Mon Mar 16, 2009 11:56 am

Hey SYSTEM, nice of you to join the thread

What if I use fsutil to make a link of the specific file on the same volume (say in the "My_File" folder) and then I use linkd to make a junction across partitions of the "My_File" folder?

Do you think that this (sort of file bouncing via link/junction) could work?

Thanks

SYSTEM
Posts: 1743
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

spicydog wrote:Hey SYSTEM, nice of you to join the thread

What if I use fsutil to make a link of the specific file on the same volume (say in the "My_File" folder) and then I use linkd to make a junction across partitions of the "My_File" folder?

Do you think that this (sort of file bouncing via link/junction) could work?

Thanks
Depends on the definition of "work".

If I understand your idea correctly, there is a file (say, "F:\something\myfile.txt"), and you create a hard link to that file (say, "F:\My_File\myfile2.txt"). Finally, you create a junction point in a different partition (say, "G:\My_Folder") that points to the directory where the hard link resides.

The result of the above example is that the content of "F:\something\myfile.txt" will show up in "G:\My_Folder\myfile2.txt". If that is enough for you, then yes, it will work.
My YouTube channel | Release date of my 11th playlist: January 26, 2018

spicydog
Posts: 262
Joined: Mon Mar 16, 2009 11:56 am

When you (SYSTEM) wrote: "...If that is enough for you, then yes, it will work." I was really hoping that you would have been right... (please read further)...

OK, this is what I did:

1) I created 3 folders:

- C:\SOURCE <<-- (this contains the "Test.txt" file)
- C:\TARGET ON THE SAME VOLUME <<-- (this contains nothing)
- E:\TARGET ON ANOTHER VOLUME <<-- (this contains nothing)

2) Then I (successfully) created the hardlink with fsutil in this way:

fsutil hardlink create "C:\TARGET ON THE SAME VOLUME\Test.txt" "C:\SOURCE\Test.txt"

3) When I attempted to create the junction (with either linkd.exe or junction.exe) in this way:

Linkd "C:\TARGET ON THE SAME VOLUME" "E:\TARGET ON ANOTHER VOLUME"

OR

junction "C:\TARGET ON THE SAME VOLUME" "E:\TARGET ON ANOTHER VOLUME"

The error "Cannot create a file when that file already exists" popped up. This would suggest that the junction point source (the "TARGET ON THE SAME VOLUME" folder) should not exist... In fact I noticed that it gets created by the console.

I have tried the other way around (creating first the junction point and then the hardlink) but fsutil returns the infamous error "The new link and the existing file must be on the same volume."

Am I doing something wrong? Am I missing something?

SYSTEM
Posts: 1743
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

spicydog wrote: Am I doing something wrong?
Yes, you are.
spicydog wrote: 3) When I attempted to create the junction (with either linkd.exe or junction.exe) in this way:

Linkd "C:\TARGET ON THE SAME VOLUME" "E:\TARGET ON ANOTHER VOLUME"

OR

junction "C:\TARGET ON THE SAME VOLUME" "E:\TARGET ON ANOTHER VOLUME"
The parameters are in a wrong order. The command should be the following (with Junction, I haven't used linkd):

Code: Select all

junction "E:\TARGET ON ANOTHER VOLUME" "C:\TARGET ON THE SAME VOLUME"

I know that the order isn't logical. I often mess the parameters up as well.
My YouTube channel | Release date of my 11th playlist: January 26, 2018

spicydog
Posts: 262
Joined: Mon Mar 16, 2009 11:56 am

Kiitoksia kauhean paljon

Illogical indeed, I totally agree with you but... NOW IT WORKS!!!

Thanks for pointing me in the right direction, SYSTEM!

Hopefully this thread will be useful for somebody else who also needs to create the hardlink of a file on a different partition in XP... In fact by combining two tools (fsutil.exe and either linkd.exe or junction.exe) this is indeed possible.

Case solved... Thanks to all participants to the thread

PS: SYSTEM, you might want to reconsider editing your previous post (just kidding)... Actually all the 3 concepts you pointed out are perfectly correct, but the combination of two tools made the difference
SYSTEM wrote:Sorry, it is impossible.

Hard links don't work across different partitions.

Junction points can only point to directories.

Finally, symbolic links were introduced with NTFS 6.0 and Windows Vista. Windows XP can't even read them, let alone creating.

freakazoid
Posts: 918
Joined: Wed Jul 18, 2007 5:45 pm

Needed to use symbolic links and found a private app in TPFC:

Also I found this Superuser answer useful:
http://superuser.com/questions/260740/a ... 855_260753

That user recommends mklink (the command line version) and Winbolic second.
is it stealth?

I am Baas
Posts: 4142
Joined: Thu Aug 07, 2008 4:51 am