Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get file parent directory python

from pathlib import Path
path = Path("/here/your/path/file.txt")
print(path.parent.absolute())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #file #parent #directory #python
ADD COMMENT
Topic
Name
5+1 =