From c308d9a639211abcc5ef6f2385914323945e6cc4 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 1 Jun 2023 08:43:14 -0400 Subject: [PATCH] Adding code to move Kitty Cam files to separate folder that don't get purged. Current commit is just to test file paths --- main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index b6f983a..2570422 100644 --- a/main.py +++ b/main.py @@ -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