你好,我想在automator中找到一堆不同名字的文件。
我已经设置了find finder项来查找包含“room”的名称。
此操作仅选择1个文件。
问题是我有一个特定名称的列表,而不是添加许多条件并单独粘贴每个名称,我想知道是否有一种方法可以创建一个数组并列出其中的所有名称?
我尝试添加一个逗号来分隔每个名称,但它将其读取为一个大字符串。
谢谢!
发布于 2016-08-26 05:02:59
我已经创建了一个Applescript,您可以将其添加到Find Finder Items操作之后,该脚本将返回找到的文件路径列表:
on run {input, parameters}
set noFilesInputed to the number of items of input
set fileList to {}
if noFilesInputed is greater than 0 then
repeat with cFile from 1 to noFilesInputed
set cFileItem to item cFile of input
set cFilePath to cFileItem as string
set fileList to fileList & {cFilePath}
end repeat
end if
return fileList
end run
如果输入的项数为0,则输出的列表为空
希望这能有所帮助!
https://stackoverflow.com/questions/38921994
复制相似问题