0
这个applet代码在单个选定文件夹内创建特定文件夹结构,或者在单击该小程序时在Finder中打开文件夹。如果选择多个文件夹,它会中断。有多种方式可以让这个脚本在多个文件夹被选中时工作吗?Applescript:在多个文件夹中创建新的文件夹结构
property archivesFolder : "Archives"
property imagesFolder : "Images"
property proofreadFolder : "Proofreading"
property proofFolder : "Proofs"
property sourceFolder : "Source"
try
tell application "Finder" to set theLocation to the selection as alias
on error
tell application "Finder" to set theLocation to (folder of the front window as alias)
end try
tell application "Finder"
if not (exists folder archivesFolder of theLocation) then
make new folder at theLocation with properties {name:archivesFolder}
end if
if not (exists folder imagesFolder of theLocation) then
make new folder at theLocation with properties {name:imagesFolder}
end if
if not (exists folder proofreadFolder of theLocation) then
make new folder at theLocation with properties {name:proofreadFolder}
end if
if not (exists folder proofFolder of theLocation) then
make new folder at theLocation with properties {name:proofFolder}
end if
if not (exists folder sourceFolder of theLocation) then
make new folder at theLocation with properties {name:sourceFolder}
end if
end tell
伟大的作品,但失去了如果没有被选中创造了当前的取景器窗口这些文件夹的功能。 – user1231499 2012-02-27 19:10:34
@ user1231499在这里你去:https://gist.github.com/1932089 – fanaugen 2012-02-28 11:48:14
@fanaugen张贴的答案不工作?你能帮我复制一个错误吗? – adayzdone 2012-02-28 13:15:29