import os directory = "Krishna" path_dir = "C:/Users/../Desktop/current_dir/" if not os.path.exists(directory): os.mkdir(os.path.join(path_dir, directory))