0
このアプレットのコードは、アプレットがクリックされたときに、単一の選択されたフォルダまたは開いたフォルダが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
は素晴らしい作品が、何も選択されていない場合は、現在のFinderウィンドウでこれらのフォルダを作成する機能を失います。 – user1231499
@ user1231499ここに行きます:https://gist.github.com/1932089 – fanaugen
@fanaugen投稿された回答はうまくいかないのですか?エラーを複製する手助けはできますか? – adayzdone