Those listed below are our PROUD SatelliteGuys GOLD Sponsors!
Applied Instruments DishStore.NET Home Theater Cruise glorystar.tv satelliteavgs tele-satellite.com

Welcome HOME to SatelliteGuys!


  •  » Looking for help picking a television provider?
  •  » Need Help with your Satellite System?
  •  » Need Advice on your Home Theater Setup?
  •  » Looking for the latest industry news and rumors?

...then you have come to the right place!

DIRECTV, DISH Network, FTA Satellite, Cable TV, HDTV even 3DTV!

We Can Help! We are known as America's Satellite Information Source!
YES! I want to register an account for FREE right now!

YOU ARE AT THE PLACE WHERE INDUSTRY EXPERTS HANG OUT!

p.s.: Registered members see a lot less ads! REGISTER TODAY!

Results 1 to 6 of 6
  1. #1
    timmy1376's Avatar
    timmy1376 is offline SatelliteGuys Regular Crab Ball Champion, Desert Battle Champion, Ball A Track Champion
    Join Date
    May 20th, 2004
    Location
    Manhattan, KS
    Posts
    685

    Mapping network drive using bat file

    ADVERTS 1
    No problems mapping a network drive using a .bat file, but I cannot figure out for the life of me how to get the bat file to map to a folder in the share. I have a share called software and 20 folder in it called Lab 1 all the way to Lab 20

    for example:
    I do map network drives

    \\IP.IP.IP.IP\software\Lab 14

    and it works great, but trying to do that in a bat file, nothing happens

    \\IP.IP.IP.IP\software

    works great in the bat file.

    Anyone know how to get directly to that Lab 14 folder using a bat file?

  2. # ADS
    Register Today & This Ad Goes Away! Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many
     
  3. #2
    SatinKzo's Avatar
    SatinKzo is offline Supporting Founder
    Supporting Founder

    Help Keep SatelliteGuys For All, Click a Star and Become a Supporter! This Member did! Help Support The Site And Get Rid of the Syndicated Ads, This Member did! If you enjoy the site consider supporting it, this member did! Click a Star and become a Supporting Pub Member today!
    Join Date
    May 22nd, 2004
    Location
    ArkLaMiss
    Posts
    5,861
    net use x: \\ip.ip.ip.ip\share
    x: being the desired drive letter to assign.

    You can also delete the mapping

    net use x: /delete
    or
    net use x: /delete /y
    to delete and answer yes if a message requiring confirmation comes up.

    There are other more exotic ways to do it with different scripting languages.
    LG550, Pio51FD/Pio VSX-03TXH/Pansat 9200/AzBox/7MC>360 extender| 1.2m motorized/90cm on 101 & 105/80cm on 74 & 79/Homemade Gray-Hoverman: OTA/FTA/Netflix/Vudu for my viewing entertainment
    The angels have the phone box.

  4. #3
    timmy1376's Avatar
    timmy1376 is offline SatelliteGuys Regular Crab Ball Champion, Desert Battle Champion, Ball A Track Champion
    Join Date
    May 20th, 2004
    Location
    Manhattan, KS
    Posts
    685
    Thread Starter
    Got that, just cannot get the folder under the share to map using a bat file....

    but it maps fine using the Map Network drive tool

  5. #4
    SatinKzo's Avatar
    SatinKzo is offline Supporting Founder
    Supporting Founder

    Help Keep SatelliteGuys For All, Click a Star and Become a Supporter! This Member did! Help Support The Site And Get Rid of the Syndicated Ads, This Member did! If you enjoy the site consider supporting it, this member did! Click a Star and become a Supporting Pub Member today!
    Join Date
    May 22nd, 2004
    Location
    ArkLaMiss
    Posts
    5,861
    Should work fine even with a sub-dir of the shared directory

    example:

    net use x: \\ip.ip.ip.ip\share\subdir

    Just tested quicky and it works fine for me. What OS are we talking here? I assumed windows.

    If you wanted to get real fancy you could put a loop or similar in the batch file and map all 20 lab directories with just a couple lines in the batch file.
    Edit:
    OH, wait, do your lab directories look like this?

    Lab 14
    not
    Lab14
    ?

    The space is getting ya. Try this

    net use x: "\\ip.ip.ip.ip\share\subdir stuff"
    LG550, Pio51FD/Pio VSX-03TXH/Pansat 9200/AzBox/7MC>360 extender| 1.2m motorized/90cm on 101 & 105/80cm on 74 & 79/Homemade Gray-Hoverman: OTA/FTA/Netflix/Vudu for my viewing entertainment
    The angels have the phone box.

  6. #5
    timmy1376's Avatar
    timmy1376 is offline SatelliteGuys Regular Crab Ball Champion, Desert Battle Champion, Ball A Track Champion
    Join Date
    May 20th, 2004
    Location
    Manhattan, KS
    Posts
    685
    Thread Starter
    PERFECT!!!! Didn't eve consider the space messing me up.

    THANKS SO MUCH!!!!!!!!

  7. #6
    jon1nim is offline SatelliteGuys Newbie
    Join Date
    Nov 28th, 2008
    Posts
    1

    even better

    Set oShell = Createobject("wscript.shell") <enter>
    Set oNet = CreateObject("Wscript.Network") <enter>
    oNet.MapNetworkDrive "v:", "
    \name


    of computer\name of share", True, "username", "password" <enter>
    if same computer copy line to \name of share"
    if new computer drive type the full line and username and password

    this will allow you to map network drives with different user names and passwords and you can customize it to fit as many shares as needed


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
  •  

SatelliteGuys.US | 46 Miami Avenue | Newington, Connecticut 06111
Links monetized by VigLink