I
I
iROOT2013-11-30 22:34:56
Python
iROOT, 2013-11-30 22:34:56

Recursively creating folders in Python

There is a relative path of this type 'folder1\\folder2\\folder3\\file1.abc' , the number of folders can be from one to six.
How can you write a file without parsing a line by creating all the folders if they do not exist?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Damir Makhmutov, 2013-11-30
@iROOT

docs.python.org/2/library/os.html#os.makedirs
Not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question