Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris committed Sep 11, 2020
1 parent e6189c0 commit c40b0ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ def randomize_directory(path):
files.append(i)

for rename in files:
rename_to_number(path + '\\' + rename, path + '\\' + str(x))
rename_to_number(path + '/' + rename, path + '/' + str(x))
x += 1

files_tmp = files.copy()

x = 0
for rand in files:
r = random.randint(0, len(files_tmp) - 1)
os.rename(path + '\\' + str(x), path + '\\' + files_tmp[r])
os.rename(path + '/' + str(x), path + '/' + files_tmp[r])
files_tmp.pop(r)

x += 1
Expand Down

0 comments on commit c40b0ac

Please sign in to comment.