About 224,000 results
Open links in new tab
  1. python - How to create new folder? - Stack Overflow

    I want to put output information of my program to a folder. if given folder does not exist, then the program should create a new folder with folder name as given in the program. Is this possible? I...

  2. python - How do I create a directory, and any missing parent ...

    How do I create a directory at a given path, and also create any missing parent directories along that path? For example, the Bash command mkdir -p /path/to/nested/directory does this.

  3. python - Checking folder and if it doesn't exist create it - Stack …

    Dec 5, 2021 · I am quite new to python so I need some help. I would like to create a code that checks if a folder with a given name is created, if not, it creates it, if it exists, goes to it and in it …

  4. python - How can I create directories recursively? - Stack Overflow

    (For example, if a user gave input to create a directory called first/;rm -rf --no-preserve-root /;, one could potentially delete all directories). EDIT 2 If you are using Python less than 2.7, use …

  5. python - Automatically creating directories with file output - Stack ...

    In Python 3.2+, using the APIs requested by the OP, you can elegantly do the following:

  6. Python - create folder with multiple subfolders - Stack Overflow

    I need to create a list of folders each with multiple subfolders that are not nested. I have used os.makedirs ('folder/subfolder') to create a folder and a subfolder but I can only make multiple …

  7. python - Create new folder with pathlib and write files into it

    Create new folder with pathlib and write files into it Asked 8 years ago Modified 2 years, 3 months ago Viewed 243k times

  8. python - Workflow to create a folder if it doesn't exist already ...

    Aug 20, 2015 · In this interesting thread, the users give some options to create a directory if it doesn't exist. The answer with most votes it's obviously the most popular, I guess because its …

  9. How do I create a temporary directory in Python?

    Jul 11, 2010 · How can I create a temporary directory and get its path in Python?

  10. python - Write a file to a directory that doesn't exist - Stack Overflow

    You need to first create the directory. The mkdir -p implementation from this answer will do just what you want. mkdir -p will create any parent directories as required, and silently do nothing if …