delete remote files after 7 days

This commit is contained in:
Dan
2024-08-30 23:08:52 -04:00
parent 3069ce11c4
commit 739a931ba1

View File

@@ -37,7 +37,7 @@ if remoteOn is True:
for file in os.listdir(remote_path):
t = os.path.getmtime(remote_path + file)
age = (time.time() -t) / 86400
if age >= 30 and file != 'Clipboard':
if age >= 7 and file != 'Clipboard':
os.remove(remote_path + file)
logging.info('-- Deleted %s', file)
else: