adopt python
Language , Rename multiple images .
# -*- coding:utf8 -*-
import os
# Image file path
path = 'C:\\Users\\Administrator\\Desktop\\122'
# Absolute path
filelist = os.listdir(path)
i = 10
# Only for picture naming methods starting with numbers
for item in filelist:
#print('item name is ',item)
if item.endswith('.png'):
# The first picture is named 1.png
i = i + 1
# Only by converting numbers to strings can they be named
name = str(i)
# The path of the original image
src = os.path.join(os.path.abspath(path),item)
# Target image path
dst = os.path.join(os.path.abspath(path),'tufen.'+name + '.png')
try:
os.rename(src,dst)
# Print the conversion result on the terminal for inspection
print('rename from %s to %s'%(src,dst))
except:
continue