WOW! So much help! You guys are GREAT!

While waiting for all these great suggestions, I kept chipping away at it myself. Yes, I will definitely make a priority of upgrading as soon as I can.

I guess I never stated my goal very well. For clarification, I wanted to take C:\winnt\profiles\username and get back
C:\winnt\profiles\

or...

c:\documents and settings\username and get back
c:\documents and settings\

I looked at all those suggestions. Honestly, I got lost in some of the string manipulating code. Not enough coffee yet I guess. I'm gonna tear apart your stuff later to understand it better. I ended up finding a solution that is not as clean as I sure yours is, but this is what I came up with. It seems to work, but if anyone sees any potential flaws, I'd sure love to hear what you have to say. Here's my code:

;$ProfilePath reading code
$temp = 0
$position = 0
$tempprof=$UProfile
do
$temp = instr ($tempprof,"\")
if $temp > 0
$position = $position + $temp
$tempprof = substr($tempprof,$temp+1,50)
endif
until $temp = 0
$ProfilesPath = substr($UProfile,1,$position)