0

Every time I got a new machine or increased the memory capacity I used to add and add more and more hard disks to the latest machine. Now I have several disks of old data (e.g windows installation, program files, etc) plus I started to symlink files and created junctions on those hard disks with actually used data to remove some load from my primary SSD disk of files not used frequently ("C:\ProgramData\Package Cache")

Some programs on those old disks may even be used, e.g no-install versions which I often use via a link on my desktop without remembering where the location actually is and which I probably do not want to delete.

One approach would be to rename all directories and continue to use the machine for several months to see where I stumble upon dead links pointing to the drives in question, but this requires some massive turnaround until I find some (maybe not even all) locations.

Now I am looking for a more aggressive approach. I created a registry search script (https://gist.github.com/Seikilos/ab23cf6b85e1d65936a5) which allows me to search for anything in all hives. I did this to locate references to a certain old drive but no obviously relevant paths were found (mostly in HKEY_LOCAL_MACHINE\SOFTWARE\Classes). Which makes sense, as I did not install anything on this drives from the current windows installation.

But as written above I know that there are junctions or probably simple links or any other view onto this drive which I did not detect yet and I am looking for a way to check every possibility of having data used on my current installation.

Is there a known way to obtain references, e.g reading file table etc to locate junctions or symlinks?

Update: @and31415 pointed out, that there is a cmd to get all file system level links and junctions. How ever if I have a simple link (ending with .lnk) the dir command does not show it. Argument /AL ignores them at all. Find .lnk files is not hard, but I would like to be able to resolve them automatically too.

Samuel
  • 432
  • 4
  • 17
  • 1
    Related/possible duplicate: [View a list of symbolic links on system?](http://superuser.com/questions/496092/view-a-list-of-symbolic-links-on-system) – and31415 Jul 25 '14 at 10:11
  • @and31415 this does indeed help, and there is also a tool I found: http://www.nirsoft.net/utils/ntfs_links_view.html however when I have a .lnk file they are not resolved by neither of those tools. – Samuel Jul 25 '14 at 10:12
  • Unlike junctions and symbolic links, shortcuts are plain binary files. You should first list all of them and then parse their content using e.g. [LNK parser](https://code.google.com/p/lnk-parser/). – and31415 Jul 25 '14 at 10:15

0 Answers0