NET USE question.

G

Guest

So, I've read the articles on NET USE but have a question.

If I want to use a drive on the network which isn't mapped and I don't want
to map how do i go about it?

So far I've had this ...

NET USE \\XXX.XXX.XXX.XXX\D$ {password} /user:{username}

so the \\XXX.XX.... is the IP address with drive I want to get to {password}
the correct password for the {username}

Once I connect how do I go about using this resource I've connected to? It's
not mapped and doesn't simply log onto that drive so you can change locations.

I also tried to map this to a drive (which was already mapped) and it
errored. I could try to find a spare drive letter, but what happens if I
don't want to? Or is that the point and it needs a drive letter?

TIA.
 
G

Guest

1. You refer to a file on the share as \\server\share\filename.ext where you
would otherwise use x:\filename.ext - this works in both commandline and GUI
dialog-boxes. For example,

DIR \\server\share\slideshows\*.ppt /s /p

is legitimate.

2. If you use * as the driveletter, the next available will be used.

Unfortunately in NT-based Windows there is no way to over-write an existing
share, you must delete the old one first. This of course creates a catch-22,
as a batch-file has no way of knowing if a clash is going to happen. In
Windows 9x that wasn't the case, and IMHO the 9x behaviour was the preferred
arrangement. But, that's the way things are.
 
O

Og

DaveO said:
So, I've read the articles on NET USE but have a question.

If I want to use a drive on the network which isn't mapped and I don't
want
to map how do i go about it?

So far I've had this ...

NET USE \\XXX.XXX.XXX.XXX\D$ {password} /user:{username}

so the \\XXX.XX.... is the IP address with drive I want to get to
{password}
the correct password for the {username}

Once I connect how do I go about using this resource I've connected to?
It's
not mapped and doesn't simply log onto that drive so you can change
locations.

I also tried to map this to a drive (which was already mapped) and it
errored. I could try to find a spare drive letter, but what happens if I
don't want to? Or is that the point and it needs a drive letter?

TIA.

Read all about Net Use (watch for wrap):
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_use.mspx?mfr=true
Pay particular attention to the section:
.. Type net use DeviceName to get information about a specific connection.
.. Type net use to get a list of all the computer's connections.
Steve
 
P

Pegasus \(MVP\)

Ian said:
1. You refer to a file on the share as \\server\share\filename.ext where you
would otherwise use x:\filename.ext - this works in both commandline and GUI
dialog-boxes. For example,

DIR \\server\share\slideshows\*.ppt /s /p

is legitimate.

2. If you use * as the driveletter, the next available will be used.

Unfortunately in NT-based Windows there is no way to over-write an existing
share, you must delete the old one first. This of course creates a catch-22,
as a batch-file has no way of knowing if a clash is going to happen.

Yes, there is an easy way for a batch file to find out if drive X: (for
example) is already in use:

@echo off
net use | find /i "X:" > nul && net use X: /del
net use X: \\SomeServer\SomeShare
 

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