Mea maxima culpa, I went too fast, and when one goes too fast, one might stumble...
I forgot one parameter : the user dn, otherwise, you can't make a working batch file.
So, let's start again :
- you need to export pairs : user_dn,email_addy. The separator can be whatever you like, I generally choose commas.
- step 2 doesn't change : bulk modify the email addy part.
- now you can write the batch file :
FOR /F "tokens=1-2 delims=," %%A IN (users.txt) DO dsmod %%A description %%B
tokens=1-2 indicates that 2 fields should be taken into account in each lilne
users.txt is the file you exported
%%A is the 1st token encountered in each line
%%B is the second token encountered in each line
description is the attribute you want to modify
Pretty sure about the .bat syntax, however, you may want to check the dsmod syntax itself, haven't done it for a while, and no access to my AD right now.