Home >



Version 1.2.3 -- 2017-02-10

Old Versions


  • None


PathInfo is an AppleScript library which provides object oriented interface to deal with file references.

In AppleScript various kind of file references are used i.e. alias, File URL, HFS path and POSIX path. PathInfo allow to unified way to convert each others and to obtain various infomation from file references.

use PathInfo : script "PathInfo"

set a_path to "/System/Library/CoreServices/Finder.app/"

(*** Class methods ***)
log PathInfo's name_of(a_path)
log PathInfo's basename_of(a_path)
log PathInfo's path_extension_of(a_path)
log PathInfo's split_name("basename.txt")
(*basename, txt*)
log PathInfo's folder_of(a_path)

(*** Obtain path infomation ***)
set a_pathinfo to PathInfo's make_with(a_path)
log a_pathinfo's item_name()
log a_pathinfo's basename()
log a_pathinfo's path_extension()
log a_pathinfo's is_folder()
log a_pathinfo's item_exists()
log a_pathinfo's is_posix()

(*** Converting reference form ***)
log a_pathinfo's as_alias()
(*alias Macintosh HD:System:Library:CoreServices:Finder.app:*)
log a_pathinfo's as_furl()
(*file Macintosh HD:System:Library:CoreServices:Finder.app:*)
log a_pathinfo's posix_path()
log a_pathinfo's hfs_path()
(*Macintosh HD:System:Library:CoreServices:Finder.app:*)

(*** Making a new instance from the instance ***)
log a_pathinfo's parent_folder()'s posix_path()
log a_pathinfo's change_name("new_item")'s posix_path()
log a_pathinfo's change_path_extension("txt")'s posix_path()
log a_pathinfo's change_folder("/aaa/bbb/")'s posix_path()
log a_pathinfo's child("child_item")'s posix_path()


  • 1.2.3 -- 2017-02-10
    • Mac OS X 10.6 or later is required, because the help book bundle is updated.
    • Update the help book.
  • 1.2.2 -- 2012-11-08
    • Fixed errors with AppleScriptObjC.
      • In AppleScriptObjC, POSX file "path to file" must be rewiritten to "path to file" as POSIX file.
  • 1.2.1 -- 2012-05-31
    • Added "clone".
  • 1.2 -- 2012-05-25
    • Added "normalized_posix_path"
  • 1.1 -- 2012-05-11
    • added "item_exists_without_update"
    • Update Help.
      • Improved layout for small windows of the Help Viewer.
      • Fixed : "Edit Link" and "Clipboard Icon" links does not work in Mac OS X 10.6.
  • 1.0.1 -- 2011-02-10
    • make_with handler can expand "~" as user's home directory.
  • 1.0 -- 2010-03-23
    • First release.