If I have a file path such as…

/home/smith/Desktop/Test
/home/smith/Desktop/Test/

How do I change the string so it will be the parent directory?

e.g.

/home/smith/Desktop
/home/smith/Desktop/

13 Answers
13

Leave a Reply

Your email address will not be published. Required fields are marked *