Login | |
|
 |
RE: compare 2 files - 6/23/2008 12:44:59 AM
|
|
 |
|
| |
tomas
Posts: 11
Score: 0
Joined: 1/2/2008
Status: offline
|
quote:
ORIGINAL: ehvbs Hi tomas, (1) instead of arrays/nested loops you could use dictionaries (fast lookup) or even SQL joins (2) could you post a small/faked example (both of the files, expected result) Regards ehvbs 1 . Could you please clarify further on that? 2. Files; script that gets user ID's from Users OU; Set oContainer = GetObject("LDAP:// OU=users,DC=super,DC=com"") Set objFSO = CreateObject("Scripting.FileSystemObject") Set OutPutFileADID = objFSO.CreateTextFile("network IDs.txt", True) For Each oUser In oContainer OutPutFileADID.WriteLine oUser.Get("name") Next Wscript.Quit script that gets members of the group; Set objFSO = CreateObject("Scripting.FileSystemObject") Set OutPutFileADID = objFSO.CreateTextFile("members of.txt", True) Set objGroup = GetObject ("LDAP:// CN=Group,OU=Groups,DC=super,DC=com") objGroup.getInfo arrMemberOf = objGroup.GetEx("member") For Each strMember in arrMemberOf strMember = Mid(strMember, 4, 330) arrGroup = Split(strMember, "," ) eid = arrGroup(0) OutPutFileADID.WriteLine eid Next Wscript.Quit All user ID's from Users are written to network IDs.txt, user ID's that are part of group CN=Group are written to members of.txt I'm trying to get user ID's that are not part of the group CN=Group.
|
|
| |
|
|
|
|
|