Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import shutil
- import os
- import random
- import time
- def move(path,dest,temp):
- x=os.listdir(path)
- numerofile=len(x)
- while(numerofile>-1):
- numerofile=numerofile-1
- m=random.randint(0, numerofile)
- print(m)
- s=path+"/"+x[m]
- shutil.move(s,dest)
- del x[m]
- time.sleep(temp)
- if numerofile==0:
- return "Programma Terminato"
- dest= "C:/Users/Dropbox/Cartella"
- path= "C:/Users/Desktop/rinominati"
- temp= 1800
- print move(path,dest,temp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement