I am trying to iterate through a directory, do something to each of the files and then save a new file with a different name similar to the question here, but I am looking for a solution using pathlib. I am just not sure how to add the desired ending to the end of the file name
movie_dir = pathlib.Path("/movies")
save_dir = pathlib.Path("/corrected_movies")
for dir in movie_dir.iterdir():
for movie_path in dir.iterdir():
save_path = save_dir / movie_path # want to add _corrected.avi to end of file name