import os
import shutil
from PIL import Image

imageName = input("图片名：")
number = int(input("数量："))
newImageName = input("新图片名：")
if os.path.exists('./' + imageName + '/'):
  shutil.rmtree('./' + imageName + '/')

os.mkdir('./' + newImageName + '/')

for index in range(1, number):
  pic = Image.open('./beat_left (' + str(index) + ').PNG')
  newpic = pic.transpose(Image.FLIP_LEFT_RIGHT)
  newpic.save('./' + newImageName + '/' + newImageName + ' (' + str(index) + ').PNG')