Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

remove the empty directory

# Python program to explain os.rmdir() method 
      
# importing os module 
import os 
      
# Directory name 
directory = "Geeks"
      
# Parent Directory 
parent = "D:/Pycharm projects/"
      
# Path 
path = os.path.join(parent, directory) 
      
# Remove the Directory 
# "Geeks" 
os.rmdir(path)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #remove #empty #directory
ADD COMMENT
Topic
Name
6+1 =