Automaton Icon

Conditions Reference

Some AutoFiler attributes correspond to OS-X Spotlight attributes. You can query these attributes from the command line with the "mdls" command. Which attributes are supported is dependent on the applications you have installed.


Core Attributes
NameSpotlight AttributeDescription
nameName of the file without path or extension. A string.
extensionThe file name extension. A string..
full namekMDItemFSNameThe file name of the item including extension. A string.
pathThe full path of the file. A string.
folderThe full path of the folder in which the file resides. A string.
relative folderThe path of the folder in which the file resides, relative to the top level monitored folder. This becomes interesting when your rules descend into subfolders. For example, if you are monitoring the path /aaa and the file that matches is /aaa/bbb/ccc/ddd.txt, then the relative folder will be bbb/ccc. A string.
relative pathThe path of the file, relative to the top level monitored folder. This becomes interesting when your rules descend into subfolders. For example, if you are monitoring the path /aaa and the file that matches is /aaa/bbb/ccc/ddd.txt, then the relative path will be bbb/ccc/ddd.txt. A string.
Finder commentkMDItemCommentFinder comments for this file. A string.
source URL/AddresskMDItemWhereFromsDescribes where the file was obtained from. For example, a downloaded file may refer to the URL, files received by email may indicate the sender’s email address, message subject, etc. An array of strings.
kindkMDItemKindA description of the kind of item this file represents. See the Spotlight documentation for more information. Usually it is recommended to use the content type attribute instead, because OS-X applies it more consistently. A string.
content typekMDItemContentTypeThe UTI (Universal Type Identifier) a file. For example, a jpeg image file will have a value of public.jpeg/public.image/public.data. Types form a hierarchy, so that if you ask for types that conform to public.image, it includes all subtypes like jpeg and png. Unless you are an advanced user and know what you are doing, I recommend always using the conforms to test, rather than the is test, so that you don't miss out on subtypes. A string.
user tagsThe Open Meta user tags and keywords. An array of strings
color labelkMDItemFSLabelIndex of the Finder label of the file. Possible values are 0 through 7 with correspond to various colors as shown by the Finder. A number.
sizekMDItemFSSizeThe size, in bytes, of the file on disk. A number.
subfolder depthSubfolder depth when descending into folder contents. Only applicable when using the 'on subfolder contents' action. A number.
added to directory dateThe date the file was recorded as added to the directory by AutoFiler. This date can only be accurately recorded when AutoFiler is running. A date.
creation datekMDItemFSCreationDateThe date and time that the file was created. A date.
last changed datekMDItemFSContentChangeDateThe date the file contents last changed. A date.
last used dateThe last used/accessed date. A date.
last status change dateThe last file status change timestamp. A date.
owner nameThe short user name of the owner of the file. A string.
group nameThe short group name of the owner of the file. A string.
any fileMatches all files. You can use this in conjunction with the Finish Processing check box to execute an action when other rules don't match.


Image Attributes
NameSpotlight AttributeDescription
Strings
acquisition manufacturerkMDItemAcquisitionMakeThe manufacturer of the device used to aquire the document contents. A string.
acquisition modelkMDItemAcquisitionModelThe model of the device used to aquire the document contents. For example, 100, 200, 400, etc. A string.
albumkMDItemAlbumThe title for a collection of media. This is analagous to a record album, or photo album. A string.
color profilekMDItemProfileNameThe name of the color profile used by the document contents. A string.
color spacekMDItemColorSpaceThe color space model used by the document contents. For example, “RGB”, “CMYK”, “YUV”, or “YCbCr”. A string.
EXIF versionkMDItemEXIFVersionThe version of the EXIF header used to generate the metadata. A string.
exposure programkMDItemExposureProgramThe class of the exposure program used by the camera to set exposure when the image is taken. Possible values include: Manual, Normal, and Aperture priority.
exposure timekMDItemExposureTimeStringThe exposure time, in seconds, used to aquire the document contents. A number.
metering modekMDItemMeteringModeThe metering mode used to take the image. Possible values are: Unknown, Average, CenterWeightedAverage, Spot, MultiSpot, Pattern, and Partial. A string.
Numbers
aperturekMDItemApertureThe aperture setting used to aqure the document contents. This unit is the APEX value. A number.
exposure modekMDItemExposureModeThe exposure mode used to aquire the document contents. Possible values are 0 (auto exposure), 1 (manual exposure) and 2 (auto bracket). A number.
F numberkMDItemFNumberThe diameter of the diaphragm aperture in terms of the effective focal length of the lens.
focal lengthkMDItemFocalLengthThe actual focal length of the lens, in millimeters. A number.
ISO speedkMDItemISOSpeedThe ISO speed used to aquire the document contents. A number.
maximum aperturekMDItemMaxApertureThe smallest f-number of the lens. The unit is the APEX?? value. Ordinarily it is given in the range of 00.00 to 99.99. A number.
pixel heightkMDItemPixelHeightThe height, in pixels, of the contents. For example, the image height or the video frame height. A number.
pixel widthkMDItemPixelWidthThe width, in pixels, of the contents. For example, the image width or the video frame width. A number.
resolution heightkMDItemResolutionHeightDPIResolution height, in DPI, of this image. A number.
resolution widthkMDItemResolutionWidthDPIResolution width, in DPI, of this image. A number.
Booleans
has alpha channelkMDItemHasAlphaChannelIndicates if this image file has an alpha channel. A boolean.
manual white balancekMDItemWhiteBalanceThe white balance setting used to aquire the document contents. Possible values are 0 (auto white balance) and 1 (manual). A number.
orientation is portraitkMDItemOrientationThe orientation of the document contents. Possible values are 0 (landscape) and 1 (portrait). A number.
red-eye reductionkMDItemRedEyeOnOffIndicates if red-eye reduction was used to take the picture. Possible values are 0 (no red-eye reduction mode or unknown) and 1 (red-eye reduction used). A boolean.
Lists
layer nameskMDItemLayerNamesThe names of the layers in the file. An array of strings.


Audio Attributes
NameSpotlight AttributeDescription
Strings
audio encoding applicationkMDItemAudioEncodingApplicationThe name of the application that encoded the data contained in the audio file. A string.
composerkMDItemComposerThe composer of the music contained in the audio file. A string.
genrekMDItemMusicalGenreThe musical genre of the song or composition contained in the audio file. For example: Jazz, Pop, Rock, Classical. A string.
instrument categorykMDItemMusicalInstrumentCategorySpecifies the category of an instrument. Files should have an instrument associated with them ('Other Instrument' is provided as a catch-all). For some categories, such as 'Keyboards', there are instrument names which provide a more detailed instrument definition, for example 'Piano' or 'Organ'. A string.
instrument namekMDItemMusicalInstrumentNameSpecifies the name of instrument relative to the instrument category. Files can have an instrument name associated with them if they have certain instrument categories. For example, the 'Percussion' category has multiple instruments, including 'Conga' and 'Bongo'. A string.
key signaturekMDItemKeySignatureThe key of the music contained in the audio file. For example: C, Dm, F#m, Bb. A string.
loops key filter typekMDItemAppleLoopsKeyFilterTypeSpecifies key filtering information about a loop. Loops are matched against projects that often in a major or minor key. To assist users in identifying loops that will 'fit' with their compositions, loops can be tagged with one of the following key filters: 'AnyKey' 'Minor' 'Major' 'NeitherKey' 'BothKeys'. 'AnyKey' means that it fits with anything (whether in a major key, minor key or neither). 'Minor' fits with compositions in a minor key. 'NeitherKey' doesn't work well with compositions that are in major or minor key. 'BothKeys' means it fits with major or minor key. A string.
loops loop modekMDItemAppleLoopsLoopModeSpecifies how a file should be played. Tagged files can either be loops or non-loops (e.g., a cymbal crash). 'Looping' indicates if the file should be treated as a loop. 'Non-looping' indicates the file should not be treated as a loop. A string.
loops root keykMDItemAppleLoopsRootKeySpecifies the loop's original key. The key is the root note or tonic for the loop, and does not include the scale type. A string.
lyricistkMDItemLyricistThe lyricist, or text writer, of the music contained in the audio file. A string.
time signaturekMDItemTimeSignatureThe time signature of the musical composition contained in the audio/MIDI file. For example: '4/4', '7/8'. A string.
Numbers
audio sample ratekMDItemAudioSampleRateSample rate of the audio data contained in the file. The sample rate is a float value representing hz (audio_frames/second). For example: 44100.0, 22254.54. A number.
audio track numberkMDItemAudioTrackNumberThe track number of a song or composition when it is part of an album. A number (integer).
number of audio channelskMDItemAudioChannelCountNumber of channels in the audio data contained in the file. This integer value only represents the number of discreet channels of audio data found in the file. It does not indicate any configuration of the data in regards to a user's speaker setup. A number.
recording yearkMDItemRecordingYearIndicates the year the item was recorded. For example, 1964, 2003, etc. A number.
tempokMDItemTempoA float value that specifies the beats per minute of the music contained in the audio file. A number.
Booleans
is general MIDI sequencekMDItemIsGeneralMIDISequenceIndicates whether the MIDI sequence contained in the file is setup for use with a General MIDI device. A boolean.
Lists
loop descriptorskMDItemAppleLoopDescriptorsSpecifies multiple pieces of descriptive information about a loop. Besides genre and instrument, files can contain descriptive information that help users in refining searches. An array of strings.
Dates
recording datekMDItemRecordingDateThe recording date of the song or composition. This is in contrast to 'kMDItemContentCreationDate' which, could indicate the creation date of an edited or 'mastered' version of the original art. A date.


Video Attributes
NameSpotlight AttributeDescription
Strings
delivery typekMDItemDeliveryTypeThe delivery type. Values are “Fast start” or “RTSP”. A string.
Numbers
audio bit ratekMDItemAudioBitRateThe audio bit rate. A number."
total bit ratekMDItemTotalBitRateThe total bit rate, audio and video combined, of the media. A number.
video bit ratekMDItemVideoBitRateThe video bit rate. A number.
Booleans
streamablekMDItemStreamableWhether the content is prepared for streaming. A boolean.
Lists
codecskMDItemCodecsThe codecs used to encode/decode the media. An array of strings.
media typeskMDItemMediaTypesThe media types present in the content. An array of strings.


Common Attributes
NameSpotlight AttributeDescription
Strings
application creatorkMDItemCreatorApplication used to create the document content (e.g. 'Word', 'AppleWorks', etc.). A string.
citykMDItemCityIdentifies city of origin according to guidelines established by the provider. For example, 'New York', 'Cupertino', or 'Toronto'. A string.
commentkMDItemCommentA comment related to the file. This differs from the Finder comment, kMDItemFinderComment. A string.
contentkMDItemTextContentContains a text representation of the content of the document. Data in multiple fields should be combined using a whitespace character as a separator. An application's Spotlight importer provides the content of this attribute. Applications can search for values in this attribute, but are not able to read the content of this attribute directly. A string.
content typekMDItemContentTypeThe UTI pedigree of a file. For example, a jpeg image file will have a value of public.jpeg/public.image/public.data. The value of this attribute is set by the MDImporter. Changes to this value are lost when the file attributes are next imported. A string.
copyright ownerkMDItemCopyrightThe copyright owner of the file contents. A string.
countrykMDItemCountryThe full, publishable name of the country or primary location where the intellectual property of the item was created, according to guidelines of the provider. A string.
coveragekMDItemCoverageThe extent or scope of the content of the resource. Coverage will typically include spatial location (a place name or geographic co-ordinates), temporal period (a period label, date, or date range) or jurisdiction (such as a named administrative entity). Recommended best practice is to select a value from a controlled vocabulary, and that, where appropriate, named places or time periods be used in preference to numeric identifiers such as sets of co-ordinates or date ranges. A string.
descriptionkMDItemDescriptionA description of the content of the resource. The description may include an abstract, table of contents, reference to a graphical representation of content or a free-text account of the content. A string.
Finder commentkMDItemFinderCommentFinder comments for this file. A string.
headlinekMDItemHeadlineA publishable entry providing a synopsis of the contents of the file. For example, 'Apple Introduces the iPod Photo'. A string.
identifierkMDItemIdentifierA formal identifier used to reference the resource within a given context. A string.
instructionskMDItemInstructionsEditorial instructions concerning the use of the item, such as embargoes and warnings. For example, 'Second of four stories'. A string.
kindkMDItemKindA description of the kind of item this file represents. A string.
rightskMDItemRightsProvides a link to information about rights held in and over the resource. Contains a rights management statement for the resource, or reference a service providing such information. Rights information often encompasses Intellectual Property Rights (IPR), Copyright, and various Property Rights. If this attribute is absent, no assumptions can be made about the status of these and other rights with respect to the resource. A string.
state or provicekMDItemStateOrProvinceIdentifies the province or state of origin according to guidelines established by the provider. For example, 'CA', 'Ontario', or 'Sussex'. A string.
titlekMDItemTitleThe title of the file. For example, this could be the title of a document, the name of an song, or the subject of an email message. A string.
versionkMDItemVersionThe version number of this file. A string.
Numbers
durationkMDItemDurationSecondsThe duration, in seconds, of the content of file. A value of 10.5 represents media that is 10 and 1/2 seconds long. A number.
number of pageskMDItemNumberOfPagesNumber of pages in the document. A number.
page heightkMDItemPageHeightHeight of the document page, in points (72 points per inch). For PDF files this indicates the height of the first page only. A number.
page widthkMDItemPageWidthWidth of the document page, in points (72 points per inch). For PDF files this indicates the width of the first page only. A number.
ratingkMDItemStarRatingUser rating of this item. For example, the stars rating of an iTunes track. A number.
security methodkMDItemSecurityMethodThe security or encryption method used for the file. A number.
Lists
audienceskMDItemAudiencesThe audience for which the file is intended. The audience may be determined by the creator or the publisher or by a third party. An array of strings.
authorskMDItemAuthorsThe author, or authors, of the contents of the file. The order of the authors is preserved, but does not represent the main author or relative importance of the authors. An array of strings.
contactskMDItemContactKeywordsA list of contacts that are associated with this document, not including the authors. An array of strings.
contributorskMDItemContributorsThe entities responsible for making contributions to the content of the resource. Examples of a contributor include a person, an organization or a service. An array of strings.
domainsThe domains or hosts where the file was obtained from. For example, a downloaded file may refer to the URL, files received by email may indicate the sender’s email address, message subject, etc. An array of strings.
email addresseskMDItemEmailAddressesEmail addresses related to this item. An array of strings.
encoding applicationskMDItemEncodingApplicationsApplication used to convert the original content into it's current form. For example, a PDF file might have an encoding application set to 'Distiller'. An array of strings.
fontskMDItemFontsFonts used in this item. You should store the font's full name, the postscript name, or the font family name, based on the available information. An array of strings.
instant message addresseskMDItemInstantMessageAddressesInstant message addresses related to this item. An array of strings.
keywordskMDItemKeywordsKeywords associated with this file. For example, “Birthday”, “Important”, etc. An array of strings.
languageskMDItemLanguagesIndicates the languages of the intellectual content of the resource. Recommended best practice for the values of the Language element is defined by RFC 3066. An array of strings.
organizationskMDItemOrganizationsThe company or organization that created the document. An array of strings.
phone numberskMDItemPhoneNumbersPhone numbers related to this item. An array of strings.
projectskMDItemProjectsThe list of projects that this file is part of. For example, if you were working on a movie all of the files could be marked as belonging to the project “My Movie”. An array of strings.
publisherskMDItemPublishersThe entity responsible for making the resource available. For example, a person, an organization, or a service. Typically, the name of a publisher should be used to indicate the entity. An array of strings.
recipientskMDItemRecipientsRecipients of this item. An array of strings.
Source URL/AddresskMDItemWhereFromsDescribes where the file was obtained from. For example, a downloaded file may refer to the URL, files received by email may indicate the sender’s email address, message subject, etc. An array of strings.
Dates
content creation datekMDItemContentCreationDateThe date that the contents of the file were created. This can be different than the file creation date. Its can be used to store when the file contents were first created, or first modified. A date.
content modification datekMDItemContentModificationDateThe date and time that the contents of the file were last modified. This is not necessarily the file modification date. A date.
due datekMDItemDueDateDate this item is due. A date.
last metadata changeThe last file status change timestamp. A date.
last usedThe last used/accessed date. A date.

See also

Rules
Actions Reference