Macでフォルダの中にある全てのファイルを上の階層に移動する方法 [Applescript] [Automator]

これがやりたくてぐぐってたけどautomatorだけじゃできなくて
applescript勉強しよう!と決断して数時間勉強してやっとできた!うれしい
automatorと併用して使って下さい。
フォルダを選択している状態で中身を取得してそれらに対して以下のapplescriptを実行しています。

on run {input, parameters} 
	set thefile to item 1 of input
	tell application "Finder"
		set output to (container of (container of thefile))
		repeat with currentItem in input
			move currentItem to output
		end repeat
	end tell
	return
end run

勉強したおかげでmac上で色々便利なことが簡単にできそうで作業効率化できそう

勉強させていただいたサイト
http://tonbi.jp/AppleScript/