-- read file
set sourceFileAlias to choose file with prompt "Select text file"
-- 初期設定
set sourceFile to -1
set wholeList to {}
try
set sourceFile to open for access sourceFileAlias
set source to read sourceFile as text using delimiter return
close access sourceFile
on error message
if sourceFile is not equal to -1 then close access sourceFile
error message
end try
-- open folder
set mifold to choose folder
-- decompose csv
try
set AppleScript's text item delimiters to return
set lineList to text items of source
repeat with aLine in lineList
set finderName to text items of aLine
tell application "Finder"
make new folder at mifold with properties {name:finderName}
end tell
end repeat
on error message
error message
end try
これで
rakeem
org44
oreore
とか改行して保存しているtextファイルを
読み込むとそれらの行にあるstringのフォルダを指定の
フォルダ内に作ってくれる。
AppleScriptが全く分からない初心者だけど取り敢えずこんな感じかな。
なんか慣れない・・・(´・ω・`)アボーン
ということで仕事で必要だったから勉強したので習作だけどファイルうぷ。


textファイルからfolder作成。