I'm beginning to learn python and I thought I should try to make a program.
So I tried to make minecraft texture randomizer. I think my code makes sense but there is a huge problem I did not think through. When I rename the files in a random order. It cant rename for example. "Obsidian.png" -> "Endstone.png" as obsidian so I tried using `os.mkdir()` and copy the file and paste it into that folder, then it would rename that file, however there is still a message. And just to clarify I will make it so it will delete the old folder and rename the new folder to the same name.

My code:

```
import random
import shutil

def my_shuffle(arr):
    random.shuffle(arr)
    return arr

os.chdir('C:/Users/PC Specialist/Documents/Python Scripts/r/assets\minecraft/textures/item')
oldTextures = os.listdir()
newRandomizedTextures = my_shuffle(os.listdir())

print(newRandomizedTextures)
i = 0

os.mkdir("C:/Users/PC Specialist/Documents/Python Scripts/r/assets\minecraft/textures/item1")

for x in newRandomizedTextures:
    shutil.copy('C:/Users/PC Specialist/Documents/Python Scripts/r/assets\minecraft/textures/item/' + oldTextures[i], 'C:/Users/PC Specialist/Documents/Python Scripts/r/assets\minecraft/textures/item1')
    os.rename('C:/Users/PC Specialist/Documents/Python Scripts/r/assets\minecraft/textures/item1/' + oldTextures[i], 'C:/Users/PC Specialist/Documents/Python Scripts/r/assets/minecraft/textures/item1/' + newRandomizedTextures[i])
    i = i + 1

```

This is the error:

```
Traceback (most recent call last):
  File "C:\Users\PC Specialist\Documents\Python\pythonProject\main.py", line 16, in <module>
    os.mkdir("C:/Users/PC Specialist/Documents/Python Scripts/r/assets\minecraft/textures/item1")
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:/Users/PC Specialist/Documents/Python Scripts/r/assets\\minecraft/textures/item1'

```