isnt that what i said?

Anyway, for reading all the foldernames into a file, you can use this: DirPlus ()

Then, the easiest way would be to check for every User/Foldername in the AD (depends on how many users you've got, if its a too heavy load for your DC) For this you could e.g. use that simple UDF:

Code:

Function userexist ($adloginname)

$userpath = "LDAP://cn="+$adloginname+",ou=OrganisationUnit,dc=subdomain,dc=domain,dc=com"
$UserObj = GetObject($userpath)

If @ERROR
$accountexist = 0
Else
$accountexist = 1
EndIf

EndFunction




But there are multiple ways, depending on your needs. You can also read all memebers of a certain group (AllUSERS) to a file and compare them to the folderfile, or just check for groupmembership with INGROUP (). And so on...