Is there a clean way of taking a path like this:
/foo/bar/faz/baz/
where foo
and bar
exist, but faz
and baz
don't, and create create faz
and baz
while leaving foo
and bar
alone? (Of course, this should work for something like exists/exists/exists/doesnt_exist/doesnt_exit/doesnt_exist/doesnt_exist
or whatever (number of non existants/existants is variable) too.
Thanks!
os.makedirs
does exactly that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With