# shutilがフォルダのコピーライブラリ
import shutil,datetime
# 現在時間
dt_now=datetime.datetime.now()
# 月日時分秒
dt_now=dt_now.strftime("%m%d%H%M%S")
send_fold="D:\\元フォルダ\\"
send_file="元ファイル名"
rece_fold="C:\\Users\\aaa\\Dropbox\\バックアップ先フォルダ\\"
rece_file=dt_now+send_file
send=send_fold+send_file
rece=rece_fold+rece_file
shutil.copytree(send,rece)
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme