navigating to a folder shortcut

1

I have a windows shortcut to a folder, and want to be able to navigate to it in command prompt. Is there a way?

Nick

Posted 2010-12-21T12:30:19.277

Reputation: 393

Answers

2

If you actually want to do it directly from the command line a better option would be to use a symbolic link. XP doesn't have support for this natively (Vista/7 do), but Winbolic Link will do it for you. If you create a junction you will change directory seamlessly and it will appear like a normal folder. As far as I am aware this is directly implemented in the file system.

Another option would be to have the normal shortcut and also create a batch file alongside it, so when you wanted to change dir using that shortcut instead of invoking foobar.lnk you could do foobar.bat (or just foobar if there aren't any other executables in the directory) and put in the batch:

cd "where you want to chdir to"

Neither is ideal, but as far as I am aware there is no way to natively navigate using the file-based links that windows generates using the command prompt.

If you just want to invoke it, just do

start foobar.lnk

Matthieu Cartier

Posted 2010-12-21T12:30:19.277

Reputation: 3 422

0

I don't know of a way to navigate to it in the sense of using it in conjunction with a cd command.

You can invoke it thus: C:\Documents and Settings\RedGrittyBrick\Desktop\example.lnk - which opens the folder in explorer if example.lnk is a shortcut to something like c:\temp

RedGrittyBrick

Posted 2010-12-21T12:30:19.277

Reputation: 70 632