how can i get the folder names existing in a directory using Python ?
I want to save all the subfolders into a list to work with the names after that but i dont know
Use os.walk(path)
os.walk(path)
import os path = 'C:\\' for root, directories, files in os.walk(path): for directory in directories: print os.path.join(root, directory)