Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. import shutil
  2. import os
  3.  
  4. print("Welcome to moves.py!")
  5. print("-------------------------------------------------------------------")
  6. path = '/home/jungle/torrents/'
  7. source = os.listdir(path)
  8.  
  9. destination = '/home/jungle/Desktop/Windows-Share'
  10.  
  11. for i in source:
  12.     print i
  13.     print("Please choose a folder")
  14.     folder = raw_input("1)Movies 2)Television 3)Music\n")
  15.     if folder == "1":
  16.         destination = '/home/jungle/Desktop/Windows-Share/Movies'
  17.         shutil.move(path+i, destination)
  18.         print(i + " added to: " + folder + " . Enjoy!")
  19.     elif folder == "2":
  20.         destination = '/home/jungle/Desktop/Windows-Share/Television'
  21.         shutil.move(path+i, destination)
  22.         print(i + " added to: " + folder + " . Enjoy!")
  23.     elif folder == "3":
  24.         destination = '/home/jungle/Desktop/Windows-Share/Music'
  25.         shutil.move(path+i, destination)
  26.         print(i + " added to: " + folder + " . Enjoy!")
  27.     else:
  28.         shutil.move(path+i, destination)
  29.         print(i + " added to default folder.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement