/ Published in: Python

save as a file and run....
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import sys import os def ensure_dir(f): d = os.path.dirname(f) if not os.path.exists(d): os.makedirs(d) def main(): for x in range(150): # change this as needed filename = "/Users/mac/Desktop/temp/" + str(x+1) + "/" ensure_dir(filename) if __name__ == '__main__': main()
Comments
