I have to build a way to seperate out First name middle name and last name in a txt file. This comes in as a csv that looks like this;
firstname middlename lastname, emailaddress, userid
What i need is to be able to serapte out each part of the name. I tried using array but not all names have middlename so i get a out if range on the names thats only has a first and last. I would like to be able to test for first middle and last and somehow pull each one into a variable that i can use latter in the script. And ideas would be great.
namearray = Split(Fullname," ")
Firstname = namearray(0)
Middlename = namearray(1)
Lastname = namearray(2)
WScript.Echo Firstname
WScript.Echo Middlename
WScript.Echo Lastname
firstname middlename lastname, emailaddress, userid
What i need is to be able to serapte out each part of the name. I tried using array but not all names have middlename so i get a out if range on the names thats only has a first and last. I would like to be able to test for first middle and last and somehow pull each one into a variable that i can use latter in the script. And ideas would be great.
namearray = Split(Fullname," ")
Firstname = namearray(0)
Middlename = namearray(1)
Lastname = namearray(2)
WScript.Echo Firstname
WScript.Echo Middlename
WScript.Echo Lastname