最初にターゲットのフォルダを、次に保存先フォルダを指定します。
EXIFがない画像は移動せずそのままです。
AppleScriptなのでMac専用。
もっと速く処理する方法もありそうですが、とりあえず動くので、だいぶ前に作ったAppleScriptですが、せっかくなので公開。
要EXIFTool
tell application "Finder"set aliaspath to target of window 1 as stringend tellchoose folder default location aliaspath as aliasset dir to (result)'s POSIX pathset targetDir to (choose folder)'s POSIX pathset objs to paragraphs of (do shell script "mdfind -onlyin " & dir & " " & ".jpg")repeat with obj in objsset obj to quoted form of the POSIX path of objtrydo shell script "/usr/local/bin/exiftool -CreateDate" & " " & objset CDR to resultset AppleScript's text item delimiters to ":"set CDRList to text items of CDRset yy to item 2 of CDRList --年取得set AppleScript's text item delimiters to spaceset yy to item 2 of text items of yyset mm to item 3 of CDRList --月取得set dd to item 4 of CDRList --日取得set AppleScript's text item delimiters to spaceset dd to item 1 of text items of ddset yymmdd to yy & mm & ddset targetDir2 to targetDir & yymmdddo shell script "mkdir -p " & quoted form of the POSIX path of targetDir2do shell script "mv " & obj & " " & targetDir2end try
end repeat