Since you want to remove it, that is not the best way to go. Use Split() to break the path into array elements and then AScan() to search for the element. Then reassemble the elements, leaving out the one you don't want and write it back.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.