fobotcso,
You can also map drives to other computer's shares on the
command line.
Try:
"net use z: \\computer_name\share /persistent:no"
Substitute "computer_name" and "share" for the relevant
data.
The "/persistent:no" option is there to make sure that
the mapping is NOT persistent.
Why do you want the mappings NOT to be persistent ?
If you have a mapped share to a computer which isn't
connected, you may experience a slowdown on start up,
due to the fact that the computer will retry to connect
to the share that isn't available.
This can be quite annoying.
When you don't need the mapping any more, just do
"net use z: /delete" And it will go away.
This is rather easy to implement on a batch file:
example.bat:
Code:
@echo mapping drive z: to \\computer_name\share net use z: \\computer_name\share rem do your processing bellow this line
dir z:\
@echo unmapping drive z: net use z: /delete rem end example.bat
(I cant test the batch file, but I believe it's mostly correct)
You can chose any drive letter for the mapping, but be
careful not to chose a letter already in use.
Starting with z: is a good choice.
Also check the active mappings with "net use",
this will display active mappings with shares and
drive letters.
For command reference see:
"net help use"
"net help"
Hope this helps
CS-DNA