Question : Net Use * and having it map a search drive.

I would like to know if anyone has a method to map a network drive using the following syntax and then change to the drive that was assigned by the wildcard?

The batch file would be something like this:

c:
cd\
Net use * \\server\share /USER:name
*:  (where * is the value of the drive assigned)

Answer : Net Use * and having it map a search drive.

net_use_* \\nt4_pdc\public_>_test.txt
for_/f_"tokens=2"_%%i_in_('findstr_"Drive"_test.txt')_do_set_drive=%%i

Or just cut and paste it into notepad and save as batch file straightaway.

Random Solutions  
 
programming4us programming4us