Skip to content

Instantly share code, notes, and snippets.

@doct0rX
Last active June 2, 2018 08:03
Show Gist options
  • Save doct0rX/99ed7bcdaaea7087a03016bf19c1a324 to your computer and use it in GitHub Desktop.
Save doct0rX/99ed7bcdaaea7087a03016bf19c1a324 to your computer and use it in GitHub Desktop.
This Script is For saving the original Photos from effected photos after you import them somewhere. you Can run the sript by placing it into the directory of the Photo Booth Photos and execute it by openning terminal and moving to the current directory and type: ```python3 photoBoothOriginl.py```
"""
This Script is For saving the original Photos from affected photos after you import them somewhere.
you Can run the sript by placing it into the directory of the Photo Booth Photos and execute it by openning terminal and moving to the current directory and type: python3 photoBoothOriginl.py
"""
import os
directoryPath = "." # This is the current directory you leave it as a dot (".") if you placed the file at the same photos directory.
print("Removed Files:")
for photoBoothOriginl in os.listdir(directoryPath):
if not photoBoothOriginl.endswith("(original).jpg") and not photoBoothOriginl.endswith(".py"):
print("\t-> " + os.path.join(directoryPath, photoBoothOriginl))
os.remove(photoBoothOriginl)
exit()
print("\tNo Deletion")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment