Replies: 1 comment 6 replies
-
See shutil. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a need to delete a folder with subfolders and content on the file system. I wonder if there is any calls that can do that recursively. I've read about creating files with non-existing folder structures. It seems to require some os calls to first create the folder structure:
https://stackoverflow.com/questions/12517451/automatically-creating-directories-with-file-output
Unfortunately I couldn't find the mkdirs('/abc/def') call in mp's os module. That means I must create these mkdir() recursively? I tried mkdir() and only one folder is allowed at a time. Same as rmdir(). So is there any modules I can import to make this easy or do I need to write my own recursive routines to handle this? I can definitely write one but need time to code and debug. If there is already such module, that would be great. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions