Advertisement
Guest User

Untitled

a guest
May 29th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #! /usr/bin/env python
  2. import os
  3. import shutil
  4.  
  5.  
  6. HOME = os.path.expanduser('~')
  7. DESKTOP = os.path.join(HOME, 'Desktop')
  8. DESKTOP_FILES = os.listdir(DESKTOP)
  9. SCREEN_SHOT_DIR = os.path.join(HOME, 'Pictures', 'Screenshots')
  10. SCREEN_SHOTS = filter(lambda f: f.startswith('Screen Shot'), DESKTOP_FILES)
  11.  
  12. def move_files():
  13. for shot in SCREEN_SHOTS:
  14. shot_file_path = os.path.join(DESKTOP, shot)
  15. shutil.move(shot_file_path, SCREEN_SHOT_DIR)
  16.  
  17. if __name__=='__main__':
  18. move_files()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement