cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How can I create directories recursively in Python?

Kaniz
Community Manager
Community Manager
 
1 ACCEPTED SOLUTION

Accepted Solutions

saipujari_spark
Valued Contributor
Valued Contributor

 We can do something like the below from python 3.2 onwards..

import os
path = '/home/parent/child1/child2'
os.makedirs(path, exist_ok=True)

Thanks,
Saikrishna Pujari
Sr. Spark Technical Solutions Engineer, Databricks

View solution in original post

1 REPLY 1

saipujari_spark
Valued Contributor
Valued Contributor

 We can do something like the below from python 3.2 onwards..

import os
path = '/home/parent/child1/child2'
os.makedirs(path, exist_ok=True)

Thanks,
Saikrishna Pujari
Sr. Spark Technical Solutions Engineer, Databricks
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.