It is currently Sun Sep 21, 2014 2:17 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Hardlinks, symbolic links and junctions
PostPosted: Fri Jan 20, 2012 9:41 am 
Offline

Joined: Mon Mar 16, 2009 11:56 am
Posts: 256
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 :mrgreen:


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Fri Jan 20, 2012 11:26 am 
Offline
User avatar

Joined: Fri Jun 17, 2011 10:26 pm
Posts: 70
Location: netherlands
Code:
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+


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Fri Jan 20, 2012 1:10 pm 
Offline

Joined: Mon Mar 16, 2009 11:56 am
Posts: 256
Thanks for your reply, dany :)

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 :mrgreen:

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 :mrgreen:


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Fri Jan 20, 2012 2:55 pm 
Offline

Joined: Sat Mar 26, 2011 2:31 am
Posts: 670
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.


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Fri Jan 20, 2012 11:22 pm 
Offline

Joined: Mon Mar 16, 2009 11:56 am
Posts: 256
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.

PS: And you, often complaining about your Vista... For once I should complain about my XP :mrgreen:


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Sat Jan 21, 2012 4:18 am 
Offline

Joined: Sat Mar 26, 2011 2:31 am
Posts: 670
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... :oops:
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.

PS: And you, often complaining about your Vista... For once I should complain about my XP :mrgreen:


For you too, thanks. :wink:


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Sat Jan 21, 2012 4:58 am 
Offline

Joined: Mon Mar 16, 2009 11:56 am
Posts: 256
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 :(

Please keep the suggestions coming :mrgreen:

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!


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Sat Jan 21, 2012 11:30 am 
Offline
User avatar

Joined: Sat Jul 31, 2010 1:19 am
Posts: 1126
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 :mrgreen:


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 seventh playlist: August 11, 2014


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Sat Jan 21, 2012 11:53 am 
Offline

Joined: Mon Mar 16, 2009 11:56 am
Posts: 256
Hey SYSTEM, nice of you to join the thread :mrgreen:

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


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Sat Jan 21, 2012 1:27 pm 
Offline
User avatar

Joined: Sat Jul 31, 2010 1:19 am
Posts: 1126
Location: Helsinki, Finland
spicydog wrote:
Hey SYSTEM, nice of you to join the thread :mrgreen:

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 seventh playlist: August 11, 2014


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Sun Jan 22, 2012 5:06 am 
Offline

Joined: Mon Mar 16, 2009 11:56 am
Posts: 256
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?


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Sun Jan 22, 2012 6:41 am 
Offline
User avatar

Joined: Sat Jul 31, 2010 1:19 am
Posts: 1126
Location: Helsinki, Finland
spicydog wrote:
Am I doing something wrong?


Yes, you are. :wink:

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:
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. :mrgreen:

_________________
My YouTube channel | Release date of my seventh playlist: August 11, 2014


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Sun Jan 22, 2012 8:11 am 
Offline

Joined: Mon Mar 16, 2009 11:56 am
Posts: 256
Kiitoksia kauhean paljon :D

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

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 :mrgreen: :mrgreen: :mrgreen: (just kidding)... Actually all the 3 concepts you pointed out are perfectly correct, but the combination of two tools made the difference :wink:

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.


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Mon Jul 08, 2013 8:02 pm 
Offline

Joined: Wed Jul 18, 2007 5:45 pm
Posts: 729
Needed to use symbolic links and found a private app in TPFC:

Junction Link Magic - http://www.portablefreeware.com/?id=272

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? ;)


Top
 Profile  
 
 Post subject: Re: Hardlinks, symbolic links and junctions
PostPosted: Mon Jul 08, 2013 8:31 pm 
Offline
User avatar

Joined: Thu Aug 07, 2008 4:51 am
Posts: 3125
freakazoid wrote:
Needed to use symbolic links and found a private app in TPFC:

Junction Link Magic - http://www.portablefreeware.com/?id=272


Junction Link Magic 2 requires admin rights + .net framework to run and is not portable;

user.config in AppData\Local\Rekenwonder_Software\

The older version crashed on my win 7.64 machine but also wrote to HKEY_CURRENT_USER\Software\Rekenwonder Software\Junction Link Magic

_________________
bəʊɡɪ bəəs


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group