Create a folder with Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|if not os.path.exists(directory):|
|print ('Error: Creating directory. ' + directory)|
|# Creates a folder in the current directory called data|
Jul 19, 2020
@khu17jain Write two makedirs statements to the same location. For loop it if you have a lot.
Jan 26, 2021
best code I have ever found, thx!
Mar 3, 2021
Jun 9, 2021
how to create a folder with name in format yyyy-mm-dd from any year to today
Sep 19, 2021
thank you man ``
Dec 23, 2021
Great! Thanks so much!
Apr 3, 2022
Thank you, very useful and helped me understand the command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
if i would like to create two folders in single directory how to do that