I woke up this morning 15/09/2019 and
Firstly I need to create the Directory and put in files which i need to list, create and delete using PHP codes but along the line i did a practical work with python scripting. So am going to show you how to create a folder with python.
Creating a folder with python code
The below codes can see you all the way to perform crucial task of creating a folder (new directory).
import os def createFolder(directory): try: if not os.path.exists(directory): os.makedirs(directory) except OSError: print ('Unable to Create directory. ' + directory +': Error') # Here creates a folder (shopinson) in the current directory the this python file resides in createFolder('./shopinson/')
the above Python Codes creates a folder called (shopinson) in the current dire