Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


June 2003

The Magic of Drive Mapping

Give users fast, easy access to network resources
RSS
Subscribe to Windows IT Pro | See More Systems Administration Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    Using Mapped Files for Backups

Download the Code Here

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
   Previous  1  [2]  3  4  Next 


Top Viewed ArticlesView all articles
Microsoft, News Corp. Discuss Locking Out Google

Microsoft and Rupert Murdoch's News Corp. recently discussed an alliance that would counter Google's fledgling online news service. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


Windows OSs Whitepapers Protecting Microsoft SharePoint

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Managing IT Across Multiple Locations

7 Ways To Get More From Your SharePoint Deployment Now

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement