0

I want to create a folder for current year. Inside current year folder, there will be a folder for current month, and inside current month folder each day a current date folder will continue to be created. That's how as time passes, new month folders and year folders would continue to be created.

I want to automate this whole folder creation. How can I do so?

Much thanks.

Deepan Das
  • 13
  • 5
  • 1
    What have you tried so far? – Klaus D. Sep 16 '21 at 14:54
  • Take a look at the *os* module. You'll find it very useful. https://docs.python.org/3/library/os.html –  Sep 16 '21 at 14:56
  • Does this answer your question? [How can I safely create a nested directory in Python?](https://stackoverflow.com/questions/273192/how-can-i-safely-create-a-nested-directory-in-python) – Maurice Meyer Sep 16 '21 at 14:56
  • I recommend using [pathlib](https://docs.python.org/3/library/pathlib.html) over os as it provides a more modern way of dealing with filesystem operations – Homan Sep 16 '21 at 15:09

0 Answers0