Hey Kent,

I've been able to get it not to delete my @userid profile but now it won't delete the others.
Code is exactly the same same yours.
What seems to happen is it skips 3 lines.
$rc = DELTREE($profilelocation+"\"+$keyname)
;$RC = DELKEY($ProfileLocation, $KeyName)
$index = $index + 1

Not sure where to go from here.

Chris