对于Mac用户-如何将文件重命名为文件夹名称加上数字,从而使文件顺序

时间:2018-08-13 16:56:14

标签: macos applescript rename

就像我的标题一样,我问如何设置文件夹以将新文件重命名为其名称加上序列号。即。文件夹名称-Cats Palying新文件名-Fluffy.jpg。当我将Fluffy.jpg添加到文件夹时,它将被重命名为Cats Playing000001.jpg,接下来是“猫Playing000002.jpg

在研究中,我找到了这个答案,但不确定如何将其更改为我的应用程序。将以下脚本放入文件夹操作中:

on adding folder items to the target_folder after receiving these_items
    tell application "Finder"
       set all_images to every item of the target_folder as list
       repeat with i from 1 to the count of these_items --iterates through all the items you dropped in the folder
          set this_image to item i of these_items --the current image
          set the name of this_image to "image" & (i + the count of all_images) as string --renames the image based on the number of images already in the folder
       end repeat
    end tell
end adding folder items to

0 个答案:

没有答案