That script WAS working pefect until I ran in to a bug. Can anyone help me again??

Script works fine that was posted by Howard Bullock until my varible changed a littel bit.

Works fine when it reads this line:

F:\AGG DOMAIN\USERNAME:(OI)(CI)F

But fails when it reads this line:

F:\CMD Files DOMAIN\USERNAME:F

The error is "Script error: array reference out of bounds! $NAMEGRP = $Account[1]

I modifed Howards script a little to fit my needs and this is what I'm actually using that's giving me the error. Any help would be WELL welcomed! Thanks!!

code:
IF INSTR ("$X", "D01\") <> 0
$Account = split(split($X,":")[0],"\")
$NAMEGRP = $Account[1]