Filesystem related Applescript

Anyone know a good guide somewhere on Filesystem related applescript commands?


Steve Griff

What sorts of tasks are you looking for?

As for a guide, the absolute best way to see this sort of thing is to look at AppleScript dictionaries and scripting additions’ dictionaries.

Open the dictionary in Script, go to “Containers and folders” suite - “disk” and you have “format” (Mac OS format/Mac OS Extended format/UFS format/NFS format/audio format/ProDOS format/MS-DOS format/NTFS format/ISO 9660 format/High Sierra format/QuickTake format/Apple Photo format/AppleShare format/UDF format/WebDAV format/FTP format/Packet-written UDF format/Xsan format/unknown format, r/o) and “journaling enabled” (boolean, r/o).

So for example if you wanted to check what type of filesystem a certain mounted disk is, you would do:

tell application "Finder"
	set myFormat to format of disk "NO_NAME"
end tell
-- for example my digital camera has got MS-DOS format

AppleScript: 1.10.7
Browser: Safari 3.2.1
Operating System: Mac OS X (10.4)