goo blog サービス終了のお知らせ 

WORK備忘録

メモ

フォルダ作成移動

2018-02-12 18:17:06 | 日記


tell application "Finder"
set chufolder to choose folder
set chufolder_uxpath to POSIX path of chufolder

end tell
set file_list to do shell script "ls -1 " & (quoted form of chufolder_uxpath) & " | sort | cut -d _ -f 1 | uniq "

set file_list_count to count every paragraph of file_list

repeat with i from 1 to file_list_count

set list_i to paragraph i of file_list

tell application "Finder"
set mv_folder to make new folder at chufolder with properties {name:list_i}

set thefile to (every file of chufolder whose ((name contains list_i)))

move thefile to mv_folder

end tell

end repeat



最新の画像もっと見る

コメントを投稿

サービス終了に伴い、10月1日にコメント投稿機能を終了させていただく予定です。