[AppleScript]フォルダ名を変更する
アップルスクリプトでフォルダ名を変更します。
変更後のフォルダ名を決める
変更するフォルダを選ぶ
の2ステップ
tell application "Finder"
-----起動
launch
-----アクテブ 全面に
activate
-----ダイアログを出して変更後のフォルダ名を指定
display dialog "変更後のフォルダ名を入力" default answer "名称未設定フォルダ"
-----戻り値をNewNameとして格納
set NewName to text returned of the result as Unicode text
-----フォルダを指定します
choose folder with prompt "フォルダを選んで下さい。" with invisibles without multiple selections allowed
-----戻り値をFolderAliasとして格納
set FolderAlias to result as alias
-----フォルダ名変更
set name of folder FolderAlias to NewName
end tell
「chgFolderName.scpt.zip」をダウンロード
| 固定リンク
「AppleScriptFolder」カテゴリの記事
- [MDLS]mdlsでフォントファミリー名を取得する(2014.12.31)
- [AppleScript]フォルダを連番で複数作る(2012.12.09)
- [Move]フォルダの移動(2010.09.15)
- [AppleScript]フォルダのアクセス権を変更する(2010.08.10)
- [AppleScript]ファイル名のフォルダを作ってその中に入れる(2010.08.05)
この記事へのコメントは終了しました。
コメント