Updated to use Machine Name instead of mapped folder. For some reason Task Scheduler stopped working with the mapped folder. I think there's also some older updates where I changed how old files are before being moved.

This commit is contained in:
Dan
2023-05-26 12:17:20 -04:00
parent 7209093638
commit a53c12b0d5
2 changed files with 3 additions and 41 deletions

View File

@@ -11,7 +11,8 @@ client = Client(account_sid, auth_token)
# File Paths
local_path = 'C:\\BlueIris\\New\\'
remote_path = 'Y:\\'
# remote_path = 'Y:\\'
remote_path = '\\\\MEDIASERVER\\BlueIris\\'
# Logging Setup
logging.basicConfig(filename='mover.log', format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p',
@@ -24,7 +25,7 @@ if remoteOn is True:
for file in os.listdir(local_path):
t = os.path.getmtime(local_path + file)
age = (time.time() - t) / 86400
if age >= 3:
if age >= 1:
shutil.move(local_path + file, remote_path + file)
logging.info('-- Moved %s', file)
for file in os.listdir(remote_path):