The hfspath( function converts a UNIX path into an HFS path.


This function has one parameter:

path – Original path, which may be in UNIX or HFS format. See Files and Folders to learn more about Folder IDs.


The hfspath( function takes a UNIX or HFS path and converts it to the HFS path to that folder.

hfspath("~/Dropbox/Public/manifesto.pdf") ☞ HD:Users:barbie:Dropbox:Public:manifesto.pdf
hfspath("Alaska:Projects:Big Bridge:plans.doc") ☞ Alaska:Projects:Big Bridge:plans.doc

This example uses the hfspath( function to help determine the name of the disk that contains the Panorama application.

local appdisk
appdisk = array(hfspath(info("panoramafolder"),1,":")

This example takes advantage of the fact that the first component of an HFS path is always the drive name (see Files and Folders).

Note: The hfspath( function has an alternative syntax that allows the folder and filename to be specified as separate parameters, like this:

hfspath(dbfolder(),"Logs") ☞ Yukon:Databases:Logs


10.0NewNew in this version.