How to follow link from command line

I

Ishmael

Under Windows XP, I have created a shortcut to a folder, e.g.
link_to_folder.lnk

Now, from the command line, how do I follow this link?

None of the following work:
cd link_to_folder.lnk
cd link_to_folder
link_to_folder
link_to_folder.lnk

I'm a Unix guy - what I'm looking for is the Windows equivalent of
symbolic links.

Thanks so much for your help!
 
P

pcbutts1

Well that depends on the error messages you are getting. When in the cmd
window are you in the directory where the shortcut is located? What are the
errors you are getting?

--

Newsgroup Trolls. Read about mine here http://www.pcbutts1.com/downloads
The list grows. Leythos the stalker http://www.leythosthestalker.com, David
H. Lipman, Max M Wachtell III aka What's in a Name?, Fitz, Beauregard T.
Shagnasty,Rhonda Lea Kirk, Meat Plow, F Kwatu F, George Orwell
 
P

pcbutts1

You also mentioned symbolic links. The problem is that symbolic links aren't
supported on Windows unless you use something like this
http://www.rekenwonder.com/linkmagic.htm but you can have work arounds like
using a batch file but answer my first questions and we can go from there.

--

Newsgroup Trolls. Read about mine here http://www.pcbutts1.com/downloads
The list grows. Leythos the stalker http://www.leythosthestalker.com, David
H. Lipman, Max M Wachtell III aka What's in a Name?, Fitz, Beauregard T.
Shagnasty,Rhonda Lea Kirk, Meat Plow, F Kwatu F, George Orwell
 
I

Ishmael

These are the error messages:
cd link_to_folder.lnk
The directory name is invalid.
cd link_to_folder
The system cannot find the path specified
link_to_folder
'link_to_folder' is not recognized as an internal or external command,
operable program or batch file.
link_to_folder.lnk
No error, but it opens up an Explorer window.

All I want to do is make a link to the desktop so I can quickly go
there without having to remember and type in the location, which I
find very non-intuitive ("Documents and Settings" ?).

Looks like I'll just have to use the third party software you
recommended.
Thanks for your help!
 
I

Ishmael

Thanks for your suggestion. I tried it, but it just opens up a new
command window.
 
P

pcbutts1

Those errors mean you are not in the correct directory. By default if you
click start >run>cmd windows will open a command prompt to your c:\Documents
and Settings\yourusername folder If so then you need to create a batch file
with the following info to open your desktop folder.

cd\C:\Documents and Settings\%username%\desktop
desktop.lnk

The example above will open the desktop folder from a command window if you
type in the name of the batch file, that batch file is in the same folder,
and as long as the desktop shortcut exists.

That's just one example, there are more. If the other program is not to your
liking then let me know and I can create the batch file for you.

--

Newsgroup Trolls. Read about mine here http://www.pcbutts1.com/downloads
The list grows. Leythos the stalker http://www.leythosthestalker.com, David
H. Lipman, Max M Wachtell III aka What's in a Name?, Fitz, Beauregard T.
Shagnasty,Rhonda Lea Kirk, Meat Plow, F Kwatu F, George Orwell
 
N

Nightowl

Ishmael said:
Under Windows XP, I have created a shortcut to a folder, e.g.
link_to_folder.lnk

Now, from the command line, how do I follow this link?

None of the following work:

I'm a Unix guy - what I'm looking for is the Windows equivalent of
symbolic links.


Hi Ishmael

I don't think .lnk files (shortcuts) can be used that way; they're like
symlinks in some ways but aren't "real" symlinks. However there are some
great tools available that create other types of links and may well do
what you want.

There's a very informative, in-depth article here you might find an
interesting read, with links to those programs:
"Windows symbolic and hard links":
http://shell-shocked.org/article.php?id=284

Happy New Year!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top