Hello Guys,

In this Python Tutorial, We are going to learn how to create multiple folders in one click

With No Delay Let’s Get Started.

First Create Python File Somewhere in your Laptop.

Now Open the Python file in Editor Mode. Start writing this code

import os 
	
directory = "Ramesh"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)


directory = "Prasad"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)


directory = "Test"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)


directory = "Main"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)


directory = "Hello"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)


directory = "My Crush"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)


directory = "Love"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)


directory = "England"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)


directory = "Pictures"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)



directory = "Downloads"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)



directory = "Last One"
	
parent_dir = "C:\\Users\\Ramesh Naidu\\Desktop\\Code World\\Python Tutorials"
	
path = os.path.join(parent_dir, directory) 
	
os.makedirs(path) 
print("Directory '% s' created" % directory)

Here directory means Folders’ name that you are creating with this Script. So Change them as you want.

Note: Change parent_dir path to your own.

That’s it Now you can Create Multiple Folders Just at One Click