I'm walking recursively through a folder using json files that contain metadata to tag some ebook files and creating a .ts folder with other json files. The process has stopped with an error and I don't want to start from zero. Is there any way given the last processed folder to continue from there? By continue I mean to not do any processing until that folder is visited.
def process_files_not_in_hidden_folder(path: str, extension: str) -> None:
"""
Get all files recursively from parent folder,
except for the ones that are in hidden folders
"""
for root, subdirs, filenames in os.walk(path):
subdirs[:] = [d for d in subdirs if not d[0] == '.']
for filename in filenames:
if filename.endswith(extension):
meta_file = os.path.join(root, filename)
export_tags(meta_file)