Last active
June 2, 2018 08:03
-
-
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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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