I wish to click on a symbolic link in File Explorer and, using a selection from the Context Menu, pass the full name of the symbolic link to a program. Note that I do not want the target of the symbolic link but the directory and name of the symbolic link itself. Using regedit, I can create a command which is passed a file name: something of the form C:/bin/foo.bat "%1". Unfortunately, foo.bat is only passed the target of the symlink. How can this script learn the original directory of the symlink?