[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 2chのread.cgiへ]
Update time : 12/30 13:21 / Filesize : 344 KB / Number-of Response : 942
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

AppleScript アップルスクリプト 質問、発表 3



657 名前:名称未設定 mailto:sage [2009/05/21(木) 15:01:33 ID:pv3/B7PX0]
OS9からOSX(10.4.11)に移行中です。
OS9では動くのですが、OSXではうまくいきません。
複数のファイルのファイルネームを新旧のテキストファイルに従ってコピーリネームをかけるものです。

どのへんがおかしいのかヒントを頂けないでしょうか?

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






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧](;´∀`)<344KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef