用python來做的話,開個文字檔貼上下面的code,
chmod u+x 之後執行
#! /usr/bin/env python
import os, commands
stdout = commands.getstatusoutput('find . -name "*.JPG"')
items = stdout[1].split('\n')
for item in items:
str1 = item.rstrip('JPG')
print('rename ' + item + ' to ' + str1 + 'jpg')
os.rename(item, str1 + 'jpg')
--
chmod u+x 之後執行
#! /usr/bin/env python
import os, commands
stdout = commands.getstatusoutput('find . -name "*.JPG"')
items = stdout[1].split('\n')
for item in items:
str1 = item.rstrip('JPG')
print('rename ' + item + ' to ' + str1 + 'jpg')
os.rename(item, str1 + 'jpg')
--
All Comments