Results 1 to 4 of 4

Thread: Need a batch script to map drive

  1. #1
    Join Date
    Jun 2009
    Posts
    4,134

    Need a batch script to map drive

    The title is all what i need here. I want to create batch script to map network drives for users at logon. At present i use to connect to a server via telnet and to map the drive i run the net use command.

    If you guys have idea of doing the same, please let me know soon. help will be appreciated.

  2. #2
    Join Date
    May 2008
    Posts
    3,516

    Re: Need a batch script to map drive

    Copy this code and save it as batch file or simply add this to your logon script.Here it is :
    @echo off
    net use G: /delete
    net use G: \\server\share
    Replace G with your desired drive letter. Here the first net code will delete any connection that is using the drive letter and the second net code will share or map the drive G.

  3. #3
    Join Date
    Feb 2009
    Posts
    673

    Re: Need a batch script to map drive

    Rem Default SBS Login Script for users
    \\sbs1\netlogon\%username%.BAT
    Or else you could add a batch file to the startup folder.You need to map the drive in this batch file:

    net use Z: \\servername\sharename
    Or

    net use Z: \\servername\sharename password /user:username
    to add credentials.

  4. #4
    Join Date
    Feb 2009
    Posts
    161

    Re: Need a batch script to map drive

    You can get that by using dos command net. you will simply get the help page by typing net help use.

    To map G drive to the server:

    net use w: \\server\sharefolder password /USER:domain\username
    Once done, use copy command files. Thats it !!!

Similar Threads

  1. Batch Script Issue
    By spmaguire in forum Software Development
    Replies: 3
    Last Post: 04-09-2013, 10:41 AM
  2. batch script to find a file
    By stevenwhite in forum Software Development
    Replies: 1
    Last Post: 10-04-2012, 12:55 PM
  3. Batch Script to Convert PNG to XPM
    By BRIGHID in forum Operating Systems
    Replies: 3
    Last Post: 22-08-2010, 03:25 AM
  4. Need a Batch script to check files
    By Ashlin in forum Software Development
    Replies: 3
    Last Post: 28-04-2009, 03:39 PM
  5. Several. Msc window from a batch / script call?
    By Stephanatic in forum Technology & Internet
    Replies: 2
    Last Post: 26-11-2008, 05:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,610,710.17750 seconds with 16 queries