I'm using a program that takes a picture every hour along with 3 other metadata files. All of these are stored in a folder. Through Terminal I made the program run ever 10 minutes. However I still want to keep the old structure of 1 picture (4 files) per hour. Thus creating 2 folders, one catch all and one that duplicates the pictures (from the catch all) with the hour timestamp into the old folder.
Right now I have this code, but I'm very lost and need some guidance.
import os
import subprocess
class cd:
def __init__(self, newPath):
self.newPath = newPath
def __enter__(self):
self.savedPath = os.getcwd()
os.chdir(self.newPath)
def __exit__(self, etype, value, traceback):
os.chdir(self.savedPath)
with cd("/User/...."):
subprocess.call("ls")
Thank you so much for any help,
Erik