How to map a network drive from windows command prompt

September 26th, 2009 by Girish | Posted under Tips & Tools, Windows. 332 views

How to map a network drive from windows command prompt

I had a daily requirement of copying few files and folders to few network folders, so for that purpose , I need to clean those folders daily and then copy the files. It was time consuming to go to each folder and delete contents so I used following script.

net use z: “\\system_name\folder\subfolder1\subfolder2\”

Above command will map a network drive as z: for the specified network folder.

Z:
rd /s/q d1
mkdir d1
rd /s/q d2
mkdir d2
rd /s/q d3
mkdir d3
rd /s/q d4
mkdir d4

These will remove the folder from that network drive and recreate the folder.

Blog Widget by LinkWithin
 

Suggested Reading:

  1. Free PDF converter download for microsoft windows word excel power point Free PDF converter download for microsoft...
  2. Instant access to your applications and windows | ENSO Launcher ENSO Launcher is a product which...
  3. 18 unavoidable keyboard shortcuts available in Windows XP 18 unavoidable keyboard shortcuts available in...
  4. Clean your computer fast – empty folder finder Clean your computer fast - empty...
  5. Useful run commands for windows and control panel .cpl commands Useful run commands for windows and...
  6. How to enable mouse in command window – copy paste using mouse in command prompt How to enable mouse in command...
  7. Windows 7 animated network activity indicator on system tray Windows 7 animated network activity indicator...
  8. what is Windows 7 GodMode and features- How to enable GodMode in Windows 7 what is Windows 7 GodMode and...






Tags: , ,

Have any comments?