Secretly collect and backup your precious memories — silently, safely, and smartly.
PhotoGrabber is a lightweight Python tool that secretly scans your main picture directory, finds all .png and .jpg image files, and moves them to a safe backup spot — without interrupting your workflow.
Whether you want to:
- Backup all your photos before formatting your PC
- Collect images from a specific folder (even subfolders!)
- Create a silent, automated backup system
PhotoGrabber does it quietly and efficiently.
This tool is designed for ethical and personal use only.
Use it responsibly — only on your own files or with explicit permission.
The name "secretly" refers to the non-intrusive background operation, not malicious intent. 😎
- ✅ Automatically finds
.pngand.jpgfiles in your Pictures folder (including all subfolders) - ✅ Copies files to a local
backupfolder (where the script is running) - ✅ Creates the backup folder automatically if it doesn't exist
- ✅ Handles errors gracefully (missing files, permission issues, etc.)
- ✅ Fully customizable — you control the source, destination, and file formats
- Detects your Windows
Picturesfolder automatically usingUSERPROFILE - Scans recursively for all
.pngand.jpgfiles - Creates a
backupfolder next to the script - Copies every found image to that backup folder using
shutil.copy2(preserves metadata)
You can easily change source, destination, and file formats by editing a few lines in the script.
Find this line:
source_dir = os.path.join(user_profile, "Pictures")Change it to any path you want. Examples:
# Grab from Desktop instead
source_dir = os.path.join(user_profile, "Desktop")
# Grab from a custom folder like D:\MyImages
source_dir = r"D:\MyImages"
# Grab from Downloads folder
source_dir = os.path.join(user_profile, "Downloads")Find these lines:
picture_files = glob.glob(os.path.join(source_dir, "**", "*.png"), recursive=True)
picture_files.extend(glob.glob(os.path.join(source_dir, "**", "*.jpg"), recursive=True))# Grab only .png files
picture_files = glob.glob(os.path.join(source_dir, "**", "*.png"), recursive=True)
# Grab .png, .jpg, .jpeg, .gif, .bmp
picture_files = glob.glob(os.path.join(source_dir, "**", "*.png"), recursive=True)
picture_files.extend(glob.glob(os.path.join(source_dir, "**", "*.jpg"), recursive=True))
picture_files.extend(glob.glob(os.path.join(source_dir, "**", "*.jpeg"), recursive=True))
picture_files.extend(glob.glob(os.path.join(source_dir, "**", "*.gif"), recursive=True))
picture_files.extend(glob.glob(os.path.join(source_dir, "**", "*.bmp"), recursive=True))
# Grab only .jpg (no subfolders) — remove recursive=True
picture_files = glob.glob(os.path.join(source_dir, "*.jpg"))