Code:
import shutil, sys, time, os
src = 'c:/users/wca36050/temp1'
dst = 'c:/users/wca36050/temp2'
now = time.time()
for f in os.listdir(src):
if os.stat(f).st_mtime < now - 7 * 86400:
if os.path.isfile(f):
shutil.move(f, dst)
Comment