Created
November 11, 2013 05:41
-
-
Save Trshant/7408442 to your computer and use it in GitHub Desktop.
Made a Python script which automates folder creation, each named for ever day of the year like 01012012.....01022012, 02022012.....31122012.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime , timedelta | |
import os | |
dt_obj = datetime(2012, 1, 1, 17, 53, 59) | |
for i in range(0,366): | |
dt_obj2 = dt_obj + timedelta(days=i) | |
os.makedirs( dt_obj2.strftime("%Y%m%d") ) | |
print "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment