05-22-2012, 02:29 AM
Hello All,
I am trying to put all the names of the different user folders on a computer into an array. On most computers, these are located in the C drive in this folder:
so my code looks like this
However, on some computers this is set up on D: drive instead of C:
Is there any Special Folder name e.g. something like "$Documents and Settings$\" that I could just put in my code to make it work under either circumstance?.
THanks,
S
I am trying to put all the names of the different user folders on a computer into an array. On most computers, these are located in the C drive in this folder:
so my code looks like this
ARRAY(str) ArrayAllUsers.create(200)
int i
Dir d
foreach(d "C:\Documents and Settings\*" FE_Dir 0x1)
,str sPath=d.FileName(1)
,sPath.replacerx("C:\\Documents and Settings\\" "")
,sel sPath; case ["NetworkService","LocalService","All Users"]; continue
,;out sPath
,ArrayAllUsers[i]=sPath
,i=i+1
ArrayAllUsers.redim(i)
out ArrayAllUsers
However, on some computers this is set up on D: drive instead of C:
Is there any Special Folder name e.g. something like "$Documents and Settings$\" that I could just put in my code to make it work under either circumstance?.
THanks,
S