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

link|improve this question

70% accept rate
feedback

2 Answers

up vote 2 down vote accepted

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
link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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