Answers for "how to check if a folder exists"

21

python check if folder exists

import os
print(os.path.isdir("/home/el"))
print(os.path.exists("/home/el/myfile.txt"))
Posted by: Guest on June-20-2020
0

how to check git folder exists or not

# .git file is hidden in directory if you want to see that
Ctrl+H <-- type this on keyboard it will shows hidden folders in it.
Posted by: Guest on December-13-2020

Code answers related to "how to check if a folder exists"

Python Answers by Framework

Browse Popular Code Answers by Language