我有一个包含大约500个选定文件名的文本文件(每个文件名都在它自己的行上),这个文件名来自拍摄超过3,000张照片的事件。我希望能够找到文件夹中的所有图像,复制它们,并将这些复制的文件移动到不同的文件夹中。使用AppleScript搜索/复制文件夹中的多个文件
这是我到目前为止。现在,它只是复制3000倍的图像的整个文件夹,并把它到目标文件夹,而不是单独的文件..
文本文件:
_EPW0847.jpg _EPW0848.jpg _EPW0853.jpg etc....
的AppleScript:
set thePhotos to paragraphs of (read (choose file with prompt "Choose a text file")) set theSourceFolder to (choose folder with prompt "Choose source folder") as string set theDestination to (choose folder with prompt "Choose destination folder") repeat with theName in thePhotos try tell application "Finder" to duplicate alias (theSourceFolder & theName) to theDestination with replacing end try end repeat tell application "Finder" tell folder theDestination to set theCount1 to (count of items) as string end tell set theCount2 to (count of thePhotos) as string display dialog (theCount1 & " of " & theCount2 & " items copied to " & theDestination) buttons {"OK"}
任何帮助会很好。我不知道苹果脚本,但我正在学习。谢谢!
嗯..它仍然复制整个文件夹。它是TXT文件的格式吗?它应该是CSV格式吗? – eliwedel
尝试编辑后的版本...... – adayzdone
也没有工作,但我找到了一个选项,它适用于我。我不得不改为CSV文件,但我不介意:) – eliwedel