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 dir
If /home/smith/Desktop/Test/../ is what you want:
/home/smith/Desktop/Test/../
dirname 'path/to/child/dir'
as seen here.