tell application "Finder" make new folder at desktop with properties {name:"copy folder"} select folder "copy folder" open selection set afolder to choose folder with prompt "複製したいファイルのあるフォルダは?" activate try set text item delimiters of AppleScript to return set text_1 to read (choose file with prompt "旧テキストファイルを選択" of type "TEXT") set text_2 to read (choose file with prompt "新テキストファイルを選択" of type "TEXT") repeat with i from 1 to (count text item of text_1) set my_item to text item i of text_1 set newname to text item i of text_2 set thefiles to (every file of entire contents of folder afolder whose name is my_item) duplicate thefiles to folder "copy folder" of desktop select file my_item of folder "copy folder" set name of selection to newname end repeat end try set text item delimiters of AppleScript to "" end tell