I would like to create a batch file to easily connect to some network drives. I was thinking of using some kind of nested for loop but I'm a bit stuck. So I have two variables:
set drives=F,G,H
set paths=LOCATION01\name1,LOCATION02\name1,LOCATION01\name2
Now I would like to be able to echo them like this: (well, instead of echo it, I will connect the right path to the right drive, but that doesn't matter here)
F -> LOCATION01\name1
G -> LOCATION02\name1
H -> LOCATION01\name2
I'm not sure of how to solve this one. At first I tried something like the following, but that sure didn't work. It just looped through every path for every drive and I just want one path per drive.
FOR %%A IN (%drives%) DO FOR %%B IN (%paths%) DO ECHO %%A %%B
So... Any suggestions? Thanks!