LoginSignup
0
0

More than 1 year has passed since last update.

昨日の日付をディレクトリ名にしてファイルをセット

Last updated at Posted at 2022-04-12

import datetime
import os
import shutil

yesterday=datetime.date.today()-datetime.timedelta(days=1)  
date=yesterday.strftime('%Y%m%d')

os.mkdir(date)
shutil.copy('template.py', date)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0