symbolic links causing files to take up twice the memory
I've just done a fresh instalation of windows 7 on my laptop, now to save up space on the main disk I have moved the program files to a seperate disk and used the mklink /j command to make a symbolic link, but the problem is it still seems to take up space on the disk where it was first on
August 21st, 2009 7:04am

Perhaps helpful: Understanding the Options: http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/Carey Frisch
Free Windows Admin Tool Kit Click here and download it now
August 21st, 2009 8:11am

so your saying I should have made a soft link instead of a hard link? the language in the options wasn't quet clear,and when I read them before I tought a soft link would only work for explorer and not for most programs
August 21st, 2009 8:38pm

so your saying I should have made a soft link instead of a hard link? the language in the options wasn't quet clear,and when I read them before I tought a soft link would only work for explorer and not for most programs HiFrom your description, you did create a soft link.Both the/J (Junction) and /D (Symlink)switches are soft links. The /H (Hard Link) switch creates a hard link.However, you cannot use a hard link for what you are trying to accomplish because a Hard Link cannot span drives or partitions.Hope this helps.Thank You for testing Windows 7 Ronnie Vernon MVP
Free Windows Admin Tool Kit Click here and download it now
August 21st, 2009 11:44pm

so your saying I should have made a soft link instead of a hard link? the language in the options wasn't quet clear,and when I read them before I tought a soft link would only work for explorer and not for most programs The distinction you need is "relative" versus "absolute".Only symbolic links allow you to create links with the relative path in the link.The original directory links created during Windows 7 install are all absolute. Therefore the copiesall point back to the original location (presumably on C:\).To get the copy to be an acurate representation, you would have to delete all the copied links and replace them with relative symbolic links. You can find the existing links using "dir /s /al" in a command prompt. To create a relative link, just use the /d switch and the relative path in mklink, such as "mklink /d "E:\Documents and Settings" "\Users".
August 22nd, 2009 12:12am

Hi Mordred First, moving the Program Files folder to a different drive is definitely not recommended because it has been shown to causea lot ofunexpected problems.However, if you have already done this, bnborg is correct, you should be using Symbolic Links tomake this work to some extent.Another thing. What you are seeing when you look at the size of the Program Files Junction folder on themain systemdrive is not a duplication of the hard drive space that is being used. The Properties of the Junction is showing you the size of the Program Files folder that it is linked to on the separate drive where itis actuallylocated. Thereal size of the Junction folder is onlya few kilobytes.Hope this helps.Thank You for testing Windows 7 Ronnie Vernon MVP
Free Windows Admin Tool Kit Click here and download it now
August 22nd, 2009 6:03pm

the problem wasn't that the file was saying it was so big, that wouldn't have been a problem, but the disk space used on the disk was showing that it still counted as if it was still on the disk instead of moved and linked to. reinstalled it again because of some different issue will try now with the /d parameter edit:the /d switch has the same effect as the /j switch
August 23rd, 2009 2:49am

the problem wasn't that the file was saying it was so big, that wouldn't have been a problem, but the disk space used on the disk was showing that it still counted as if it was still on the disk instead of moved and linked to. reinstalled it again because of some different issue will try now with the /d parameter edit:the /d switch has the same effect as the /j switch I think part of the reason the free space display was eliminated from W.Explorer was for the very reason you mention.I did some experiments today withthe mklink options /d /h /j.First, I madea test-file and test-folder on the desktop. Then I madesymlinks/junctions to them. You might want to do these same experiments and make note of whatyou find. Here's an overview of what I saw:mklink /h Allows you to make duplicated directory entries (filenames) to a file without replicating its data. So you can "duplicate" a file without it costing any additional disk space. This /h option cannot be used to make duplicated folder (directory) references. Only files. Of particular interest, at the Command Prompt, the mklink'd filename does not appear special in any way. (It does not say Junction or Symlink or give any other clue). It will not appear when you type DIR /AL either, which generates a listing of all special "reparse-points".mklink /d Produces a duplicate folder (directory), allowing you to have have multiple folders that all share the one-and-same files. The files themselves are not actually duplicated, so there is no practical disk space consumed. This special folder type is shown at the Command Prompt as a <Symlinkd>. It also shows the path you chose, which may be either relative (partial)or absolute (full) path. Eitherwaymakes a "folder"at the Windows GUI level. But (for Vista) the relative-path one doesn't appear to update the icon or show its size in its Properties. The absolute-path oneworks better in this respect. Cut-n-pastingusing theGUIcan give some prettyconfusing results.(At the Command Prompt, you can use the Move command to manipulate it, and it isunderstandable there). Right-clicking and viewing its Properties, this <Symlinkd> has aShortCut tab, but doesn't permit you to change anything except its name. Probably, but I'm just guessing, the <Symlinkd> does consume a little space, just like a ShortCut (.lnk file). But I couldn't find it.mklink /j Like above, produces a duplicate folder (directory) that behaves and appears to contain all the filesof the original folder. (So it effectively does, again, without using any extra disk space). This special folder type is shown at the Command Prompt as a <Junction>. It also shows the path you chose, but regardless if you supplied a relative or absolute path, the final result is always the full absolute path. The Windows GUI Properties shows this entry as being an actual folder (not a shortcut). I am guessing this <Junction> doesn't use any extra disk space (compared to a shortcut, which does use a little). I think this is the folder-hardlink equivalent of the /h case for files above.Practically speaking, I could see no difference between the /d and /j options. You can drag-n-drop files into either type and it works just like a normal folder. Both seem to work the same across partitions on the same drive. Maybe there's some difference in how they would act acrossseparate drives or a network. I didn't check that. There must be some reason for the two.You might like to refer to these followingdocuments, but I could find nothing there nearly as enlightening as just hacking at it.Symbolic LinksHard Links and JunctionsReparse PointsTime well spent.
Free Windows Admin Tool Kit Click here and download it now
August 23rd, 2009 4:27am

I indeed found my problem after some experiments of my own, it apears the /d switch makes a on face same link as the /j but for programs it doesn't work, the /j switch works for most programs. the problem I was initally concieving was because I had page file left on and it beeing a new instalation there was no page file being deleted after the new one being created in other words, eventho I moved the file windows stored the file hidden on the disk in case I might retrieve it through the previous versions tab of the properties window. so the solution was to turn page file of through the Advanced system settings. thank you all for helping
August 23rd, 2009 7:56am

I indeed found my problem after some experiments of my own, it apears the /d switch makes a on face same link as the /j but for programs it doesn't work, the /j switch works for most programs. the problem I was initally concieving was because I had page file left on and it beeing a new instalation there was no page file being deleted after the new one being created in other words, eventho I moved the file windows stored the file hidden on the disk in case I might retrieve it through the previous versions tab of the properties window. so the solution was to turn page file of through the Advanced system settings. thank you all for helping Hi MordredExcellent!I'm glad you were able to sort the problem.Enjoy.Thank You for testing Windows 7 Ronnie Vernon MVP
Free Windows Admin Tool Kit Click here and download it now
August 23rd, 2009 8:11am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics