EADST

Make New Folder with Current Date

Make New Folder with Current Date

import time
import os

#obtain local time
time_now = time.strftime("%Y%m%d", time.localtime())
#obtain current path
root = os.getcwd() 
path = os.path.join(root, time_now)

if not os.path.exists(path):
    os.makedirs(path)
    print("make new dir: ", path)
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
站点统计

本站现有博文242篇,共被浏览287035

本站已经建立1770天!

热门文章
文章归档
回到顶部