# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3 (ipykernel)
#     language: python
#     name: python3
# ---

# +
import os
import shutil

path = "C:/Users/User/img/"
category = "Skirt"
file_list = os.listdir(path + category)
print (file_list)

i = 1
for name  in file_list:
    src = os.path.join(path + category, name)
    if(i < 10):
        dst = "img_0000000" + "{}".format(i) + '.jpg'
    elif(10 <= i and i < 100):
        dst = 'img_000000' + "{}".format(i) + '.jpg'
    dst = os.path.join(path + category, dst)
    os.rename(src, dst)
    i += 1
# -





StarcoderdataJupyterScriptsDedupFiltered