Adding code to move Kitty Cam files to separate folder that don't get purged. Current commit is just to test file paths

This commit is contained in:
dan
2023-06-01 08:43:14 -04:00
parent a53c12b0d5
commit c308d9a639

10
main.py
View File

@@ -26,8 +26,14 @@ if remoteOn is True:
t = os.path.getmtime(local_path + file)
age = (time.time() - t) / 86400
if age >= 1:
shutil.move(local_path + file, remote_path + file)
logging.info('-- Moved %s', file)
if file.startswith('kitty'):
# shutil.move(local_path + file, remote_path + 'Kitty/' + file)
print('Kitty File ' + local_path + file, remote_path + 'Kitty/' + file)
# logging.info('-- Moved Kitty file %s', file)
else:
# shutil.move(local_path + file, remote_path + file)
print('Normal File ' + local_path + file, remote_path + 'Kitty/' + file
# logging.info('-- Moved %s', file)
for file in os.listdir(remote_path):
t = os.path.getmtime(remote_path + file)
age = (time.time() -t) / 86400