Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os #Import the os module from python standard library.
- current_directory = os.getcwd() #Get current directory.
- print(current_directory) #Print it.
- os.mkdir("NewDir") #Create a new directory.
- os.rename("NewDir", "AwesomeDir") #Rename directory.
- os.rmdir("NewDir") #Delete directory.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement