SideBar    Using Mapped Files for Backups
DOWNLOAD THE CODE:
Download the Code 38952.zip

Using the Command Line
To map drives from the command line, use the Net Use command. This command has many switches; I discuss only the most commonly used. (You can look up the command's full syntax in Windows Help.)

To see the currently mapped drives and determine which drive letters are available, type

net use

at a command prompt. As Figure 2 shows, the command returns the current status of each connection in addition to the drive letter, the share's UNC name, and the network. The network is typically Microsoft Windows Network, but if you run another OS, the Network column will reflect that. For example, if you run Novell NetWare client software and map drives to a NetWare server, the network will be NetWare.

To map a shared folder to a drive letter, specify the drive letter and the share's UNC name on the Net Use command. For example,

net use d: \\BigServer\DataFiles

maps the DataFiles share on the BigServer computer to drive D. If any folder in the share's path contains a space, you must put the entire path, including the opening double backslash (\\), in quotation marks.

Whether the computer will reconnect to the share at logon depends on the last state of the Reconnect at logon option. However, you don't need to open the GUI to see what the current setting is—you can simply use the /persistent: switch on the Net Use command to set the reconnection option you prefer. For example, to reconnect to DataFiles at logon, enter

net use d: \\BigServer\DataFiles
  /persistent: yes

To map the drive for this session only, you'd type

net use d: \\BigServer\DataFiles
  /persistent: no

Unlike the GUI's mapping function, the Net Use command lets you map to shared folders' child folders. To map an unshared subfolder called Clients in the shared DataFiles folder, you'd type

net use
  d: \\BigServer\DataFiles\Clients
Prev. page     1 [2] 3 4     next page



You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

This article has been very useful. Thanks.

Eloy

I like the article. I have used up every letter in the alphabet with my drives. Do you know how I can map more drives? Is there a command in Windows that will maybe let me use letters such as 'AA', 'BB', CC' and so on? If not, is there software I can purchase that will help me accomplish this objective?

David Meyer

For the last few days, we've had a PC start up with mapped drives disconnected. Your article reminded me about the need for clock synchronization. Ours had gotten a little off. Thanks.

Gary Vetter

to david meyer Don't undestand the problem of mapping drive number. I mount my vols under directory as permitted since w2k

cezanna

I am told that in the world of MS, where a server is sharing its drive for applications, when a client runs the application, the application actually runs on the server and therefore uses the server's CPU, Memory resources. This is certainly not true in the Unix world, though it may use a little CPU, and memory as well as I/O bandwidth for the over head of sharing out its drive. In regards to Windows, can you confirm where the application actually runs or point me to some documentation that explains this?

Ron Bogard

Any one knows how to rename (label) a network drive, using command line ? Usually the drive is called: folder on server (letter driver), I wolud like to rename it in FOLDER1 as you can do in driver properties with LABEL box.

Thanks in advance P.

Paolo

Very informative. I grew up in the DOS world. Since GUI the DOS commenads have not gotten daily use. This really helps with the "Use it or loose it" problem. Thank you very much

ASAPCS

Can you tel me how can i rename a network drive eks:h:\\servet01$ to h:\\01s$ thanks marco

Marco

mDrive = "F:\" Set oShell = CreateObject("Shell.Application") oShell.NameSpace(mDrive).Self.Name = "AnyName"

Chizl

Try this on for size, I use it to standardize drive names across my network:

set renameShell = createObject("shell.application") mappedDrive = "P:\" 'Your drive letter renameShell.nameSpace(mappedDrive).self.name = "Drive Name"

Hope this helps...

Will

Does anyone know how to reverse the net config server /autodisconnect:-1 command? Or further, what the other two values are that are changed? How to get them back to their orginal state? Best regards - the guy with the ridiculous username

Tom,Tom,TomClift

Can an ID password be passed with this command?

Anonymous User

does anyone know to have a service map a drive when it starts

ministak

Article Rating 3 out of 5

test

Anonymous User

Article Rating 5 out of 5

I set up drive mapping on this particular computer running W2k awhile ago. Now it won't retain the mapped drive in "My Computer" for restricted user account. The shortcut for the mapped drive disappears after restarting. Now if I tried to set up a new restricted account and the mapped drive shortcut stays, even after restarting. I suspect the profile on the account I created before is corrupted. I would like to know what to check in this situation. Thanks in advance.

Anonymous User

Article Rating 5 out of 5

See More Comments  1   2   3 
 
 

ADS BY GOOGLE