Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- import os
- import shutil
- HOME = os.path.expanduser('~')
- DESKTOP = os.path.join(HOME, 'Desktop')
- DESKTOP_FILES = os.listdir(DESKTOP)
- SCREEN_SHOT_DIR = os.path.join(HOME, 'Pictures', 'Screenshots')
- SCREEN_SHOTS = filter(lambda f: f.startswith('Screen Shot'), DESKTOP_FILES)
- def move_files():
- for shot in SCREEN_SHOTS:
- shot_file_path = os.path.join(DESKTOP, shot)
- shutil.move(shot_file_path, SCREEN_SHOT_DIR)
- if __name__=='__main__':
- move_files()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement