Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import shutil
- import os
- print("Welcome to moves.py!")
- print("-------------------------------------------------------------------")
- path = '/home/jungle/torrents/'
- source = os.listdir(path)
- destination = '/home/jungle/Desktop/Windows-Share'
- for i in source:
- print i
- print("Please choose a folder")
- folder = raw_input("1)Movies 2)Television 3)Music\n")
- if folder == "1":
- destination = '/home/jungle/Desktop/Windows-Share/Movies'
- shutil.move(path+i, destination)
- print(i + " added to: " + folder + " . Enjoy!")
- elif folder == "2":
- destination = '/home/jungle/Desktop/Windows-Share/Television'
- shutil.move(path+i, destination)
- print(i + " added to: " + folder + " . Enjoy!")
- elif folder == "3":
- destination = '/home/jungle/Desktop/Windows-Share/Music'
- shutil.move(path+i, destination)
- print(i + " added to: " + folder + " . Enjoy!")
- else:
- shutil.move(path+i, destination)
- print(i + " added to default folder.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement