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:
10
main.py
10
main.py
@@ -26,8 +26,14 @@ if remoteOn is True:
|
|||||||
t = os.path.getmtime(local_path + file)
|
t = os.path.getmtime(local_path + file)
|
||||||
age = (time.time() - t) / 86400
|
age = (time.time() - t) / 86400
|
||||||
if age >= 1:
|
if age >= 1:
|
||||||
shutil.move(local_path + file, remote_path + file)
|
if file.startswith('kitty'):
|
||||||
logging.info('-- Moved %s', file)
|
# 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):
|
for file in os.listdir(remote_path):
|
||||||
t = os.path.getmtime(remote_path + file)
|
t = os.path.getmtime(remote_path + file)
|
||||||
age = (time.time() -t) / 86400
|
age = (time.time() -t) / 86400
|
||||||
|
|||||||
Reference in New Issue
Block a user