|
|
|||||||
Hi, I have a string: test1#teste#testesen#dkbirfs01;MF Skrivebord users;MF Orion;dbbpc I want to cut everything before ";" and then split the rest. After ; there can be serveral ; Hope I have explained my problem clearly Jan |
||||||||
|
|
|||||||
you mean something like: split(substr($string,instr($string,";")),";") or ? |
||||||||
|
|
|||||||
There is more than one ";" so you have not explained well enough for me at least. Maybe others with better clairvoyance understand. |
||||||||
|
|
|||||||
Sorry I have a script that creates users using a txt-file. I creates users perfectly but when I want to add groups to the users it goes wrong. Everything after ; is groups in my AD the users should be added Here is part of my code: $NULL=Open(1,"c:\scripts\users.txt") $result=ReadLine(1) $uarray=SPLIT($result,";") ? "uarray: $uarray" FOR EACH $i IN $uarray ? "FOR i: $i" ; $objuser.memberof="cn="+$i+ "ou=groups,"+ $domain $objUser.SetInfo $objUser = "" NEXT |
||||||||
|
|
|||||||
I'm still not too clear on what you are up to, but if you just want to ignore the first field this should do: Code: $NULL=Open(1,"c:\scripts\users.txt") |
||||||||
|
|
|||||||
Problem solved Thanks |