我有一个文本文件,其中包含大约500张图片的文件名。
我想使用Automator:
答案 0 :(得分:3)
Run AppleScript Action中的这段代码可以解决这个问题:
on run {input, parameters}
set imgDestination to input's item 2
set imgSource to input's item 1
set imgNameFile to choose file with prompt {"Select file of image filenames:"}
set imageList to every paragraph of (read imgNameFile)
repeat with eachName in imageList
tell application "Finder"
set targetImageFile to item 1 of (get every file in folder imgSource whose name = (eachName as text))
duplicate targetImageFile to folder imgDestination
end tell
end repeat
return input
end run
我无法设计如何让Automator读取文本文件,并在选择文件夹时记住它,所以我添加了选择带有图像文件名的文件作为AppleScript的一部分。
祝你好运,