I can't find an effective way to do this. The best way to describe what I'm trying to do is by example, so where we go (assuming /bar/ is the parent):
C:\foo\bar\baz\text.txt
will be my path. I'm interested in everything up to the top-level parent directory of the path. What I need is a script that will do just that. In other words, I want to only grab the
\bar\baz\text.txt
Split doesn't work for me. It will split the file and the path, but it won't give the output like this. Is there an inbuilt function I'm missing or am I SOL? Thanks!