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 www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #python #dir #path
ADD COMMENT
Topic
Name
7+5 =