UNC and DOS problem

G

Guest

Hello all,

How on earth can I make the directory on a different computer in my network
the current directory using DOS. I keep getting an error message saying "CMD
does not support UNC paths as current directories." whenever I try the
following command in DOS:

CD \\Lil\Program Files\3DO\Heroes3\games

All I'm trying to do is print the contents of a game directory on my wife's
computer which is named Lil. I figured if I can get to that directory I
could then use the following command to print the directories contents:

DIR /ON >PRN

I'm sure there must be a way to achieve this, but the UNC is making things
difficult. Any power users who know how to solve this please respond :)

-A
 
B

Bill James

Try using the pushd command to map the remote drive. pushd \\lill\c$ If that works the prompt will show you are at the Z:\ drive which is actually the C:\drive on the remote system. Then to a CD to the directory you want, etc. After you finish, issue the popd command to remove the mapped drive.

--

Bill James
Microsoft MVP - Shell/User

Windows VBScript Utilities » www.billsway.com/vbspage/
Windows Tweaks & Tips » www.billsway.com/notes_public/
 
G

Guest

Bill,

Thanks a million. Your suggestion worked perfectly and allowed me to do
what I needed on the remote computer using DOS. Whoever said "You can't
teach an old dog new tricks" was dead wrong. Because of you I have learned
something new and very useful. You ROCK Bill James :)

-A
 
G

Guest

dudu,

Wow. that works really well and saves me the trouble of creating a mapped
drive. I had tried that same string in DOS only without the quotes but I'm
sure you already know it didn't work. So that's the secret, I need to wrap
the parameters inside quotes and add the switches outside the quotes. OK, I
got it now. Works the same way in Windows when dealing with absolute paths.

Well thank you tremendously my friend. Man, I love this forum ;-)

-A
 

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