【AppleScript】ファイル名やパス、拡張子を取得する方法

zariganitosh.hatenablog.jp

 tell application "Finder"
set select_list to selection
repeat with f in select_list
set fname_ext to f's name --ファイル名&拡張子
set fext to f's name extension --拡張子
--set fname to fname_ext's characters 1 thru -((count fext's character) + 2) as text --ファイル名
set fname to (f's name as text)'s items 1 thru -(((f's name extension as text)'s length) + 2) as text --ファイル名
set fdir to f's folder as alias --ディレクトリ
end repeat
end tell
fname_ext & return & fext & return & fname & return & fdir

返信を残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA