Results 1 to 6 of 6
- 11-11-2008 04:56 PM #1
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?
- 11-11-2008 04:56 PM # ADS
Register Today & This Ad Goes Away! Circuit advertisement- Join Date
- Always
- Location
- Advertising world
- Posts
- Many
- 11-11-2008 05:05 PM #2
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.
- 11-11-2008 05:06 PM #3
- 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
- 11-11-2008 05:14 PM #4
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.
- 11-11-2008 06:44 PM #5
- 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!!!!!!!!
- 11-28-2008 12:22 PM #6
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

LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks