|I am using a CSV file to import users into active directory.|
Surname,First Name,Middle Name,Date of Birth,Student Number,Description
I can extract all the information I need using the following statement;
FOR /F "tokens=1,2,3,4,5,6* delims=," %%A IN (users.csv) DO (
That is until a field is empty, for example no middle name;
Surname,First Name,,Date of Birth,Student Number,Description
The empty value is ignored, not counted as a token which breaks my dsadd user variables.
What can I do, I am stuck!?