|Well, if we take my above example and expand on it a bit, the csv file could look like this:|
10.0.0.1,Office1,"99 Acme Road, Acme Town, Acmeville, AC9 9ME",1234
10.0.0.2,Office2,"10 Vale Road, Vale Town, Valeville, VA9 9LE",4321
10.0.0.3,Office3,"22 Some Road, Some City, SO9 9ME",1122
10.0.0.4,Office4,"77 That Close, That Town, That City, Thatsville, TH9 9AT",2233
10.0...... and so on
Appologies for the un-imaginitive names I've used. Anyhow, the point is that there are some lines with 4 seperators in the address, others with 5 and others with just 3 so the differences could range throughout the data I have.
I was going to reference that data based on errorlevel checking of the commands from the IP Address. For example, I would run the 3 commands required for each IP Address, as noted above and then setup an auto email to say the device %IP% in %OFFICE%, %LOCATION%, %ADDRESS% cannot be accessed, please restart.... or something to that effect. This is why the variables are quite important to me.
Now that I know how to access a csv file from a batch file and process commands on IP addresses, I'm comming up with loads of applications I could use this for. But I can see this quotation/comma issue cropping up every now and then so would be nice to somehow state anything between "quotations" to ignore.