我正在尝试在mac上重命名一批文件。
文件看起来像
122试验12.JPG
我需要输出文件为
试验12.JPG
我一直在尝试使用automator,但我不知道自己在做什么。
答案 0 :(得分:1)
您可以使用AppleScript:
set myFiles to (choose file with multiple selections allowed)
repeat with aFile in myFiles
set aFile to contents of aFile
tell application "Finder"
set fileName to aFile's name
set firstDash to offset of "-" in fileName
set aFile's name to text (firstDash + 1) through -1 of fileName
end tell
end repeat