Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get dir from path

import os
your_file_path = "D:yourdirpathfile.csv"
print(f"Dir:{os.path.dirname(your_file_path)}") 
#>>> Dir:D:yourdirpath
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #dir #path
ADD COMMENT
Topic
Name
5+7 =