Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm want to do some tweaking to my PC's file hierarchy, but just moving folders and files around disables programs that depend on certain files to be in certain hard-coded addresses.

One solution that I'm hoping for is a Background Windows Service that'd keep track of file and folder movements. Then, whenever a program besides a file manager would try to access a moved file or folder, the service would re-direct it to the correct location. Manual entering of redirects is also a must.

How might I go about doing this?

share|improve this question

1 Answer 1

NOTE: This works natively on Windows 7 or Vista only (Not XP or earlier - the command doesn't exist)

If, say, you wanted to move a program to a different harddrive, you could use the mklink command to make a directory symbolic link

For example, lets say i have Steam installed to C:\Program Files\Steam

but, thanks to the recent steam sales, my OS harddrive is starting to fill up. I have another harddrive with plenty of space, so I shutdown steam, cut the directory to the new harddrive (at X:\Steam) and in a command prompt window, i type

cd "C:\Program Files"
mklink /D "Steam" "X:\Steam"

(/D makes a directory symbolic link, instead of the default file symbolic link)

Now, if you browse to Program Files using explorer, there will be a shortcut-looking folder (it'll have the little arrow on the icon) and if you open it, the path in the explorer window will still say C:\Program Files\Steam.

So windows is happy, as far as it's concerned steam is still at Program files, and I'm happy, because my OS drive now has a bit more space.

I think you can even set the link to be hidden if you don't want to see it in Program Files, but i haven't tried because i'm not that worried about it.

mklink reference

EDIT: I forgot to mention, when you open the command prompt window, run it as administrator if you're editing Program Files (Right-Click -> Run as Administrator) otherwise you might not have permission to create a file in Program Files.

share|improve this answer
    
Note, i realise it's not exactly what you asked for, but this is how I move around 'immovable' directories –  Robotnik Jul 30 '12 at 1:21
    
Thanks for the information, it'll really help if I end up having to make the software myself! –  Griffin Jul 30 '12 at 1:26
    
you could throw this in a WinForms app pretty quickly I reckon. There's probably a few floating around the web as well –  Robotnik Jul 30 '12 at 1:31
2  
And here we go. first Google result: code.google.com/p/symlinker –  Robotnik Jul 30 '12 at 1:32
    
Symbolic links are not available before Windows Vista (except probably some server version, I don't know about those). If you're on XP or older you may be able to user junctions instead. –  Erik Jul 30 '12 at 2:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.