-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmove_screenshots.py
More file actions
22 lines (18 loc) · 853 Bytes
/
move_screenshots.py
File metadata and controls
22 lines (18 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
import shutil
# Define the Desktop and screenshots folder paths
desktop_path = os.path.expanduser("~/Recents")
desktop_path = os.path.expanduser("~/Downloads")
desktop_path = os.path.expanduser("~/Desktop")
screenshot_folder = os.path.join(desktop_path, "screenshots")
# Create the screenshots folder if it doesn't exist
if not os.path.exists(screenshot_folder):
os.makedirs(screenshot_folder)
# Move all screenshot files from Desktop (those starting with "Screenshot")
for filename in os.listdir(desktop_path):
if filename.startswith("Screenshot"):
source = os.path.join(desktop_path, filename)
destination = os.path.join(screenshot_folder, filename)
shutil.move(source, destination)
print(f"Moved: {filename}")
print("All screenshots have been moved to the 'screenshots' folder on your Desktop.")