Usr6 Posted January 8, 2014 Report Posted January 8, 2014 (edited) Scriptul de mai jos "sare" in alt director -ales aleator- de fiecare data cand este executatAm fost in: C:\BugsBunny.pyAcum sunt in: C:\WINDOWSAm fost in: C:\WINDOWS\BugsBunny.pyAcum sunt in: C:\Documents and Settings\LocalService\Local Settings\Temp..#Python 2.7import randomimport sysimport osimport shutilfile_name = sys.argv[0]print "Am fost in:", file_namerandom_dir = random.randint(1, 10000)i = 0for root, subfolders, files in os.walk("C:\\"): for folder in subfolders: i += 1 if i == random_dir: dir_path = os.path.join(root, folder) shutil.move(file_name, dir_path) print "Acum sunt in:", dir_path raw_input() sys.exit() Edited January 8, 2014 by Usr6 Quote