delete remote files after 7 days
This commit is contained in:
2
main.py
2
main.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user