Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating directory shorcuts.

Status
Not open for further replies.

komyg

Programmer
Dec 13, 2005
68
BR
Hi,

I am trying to create a directory shortcut in Windows XP, that in theory should work like this: considering the directory c:\dir1, I should be able to create a shortcut dir2 that would allow me to type "cd c:\dir2" in the command console and it would show me the contents of dir1. In other words it should work like the Linux command ln -s.

I have tried creating the shortcut by the traditional way (right clicking c:\dir1 and selecting the "Create Shortcut" option), but this only works through Windows Explorer, if I type "cd c:\dir2" in the cmd, it returns an error.

I believe that the shortcut might be being treated as a file instead of a directory by the OS and thus it is treated the same way by the cd command.

I have also found the page: " that describes the command "mklink". This command would do exactly what I need, but I think that it is only available for Windows Vista (
Can anyone help me?

Thanks,
Komyg
 
Have you tried your command in XP, this site suggests that it should work. You probably have to be an Administrator.

An A-Z Index of the Windows XP command line

MKLINK Create a symbolic link (linkd)
 
Hi, thanks for the answers everyone. I've looked into the page that linney sent me and I am convinced that my Windows XP should have that command, but whenever I type mklink on the console it returns that error message that says the command you typed is incorrect or doesn't exists.

I think that this is happening because my Windows is not up-to-date with Microsoft.

Anyway since I need to convince the IT department that I need to update my Windows (and that usually takes huge amount of time), I did some more research and found another solution to my problem.

Thank you all again,
Komyg
 
mklink is not included with xp. It only comes with Vista.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top