It's possible. It depends on what you mean by 'format'.
You can extract the filename extension via:
Get Property File Extension -> Variable 1
Making it upper case will probably be nicer:
Case UPPER in Variable 1
Alternately you can extract the stream type:
Get Property Stream -> Variable 1
or you make sure m4a, m4v and mp4 are the same and aiff, aifc and aif are the same while other types are unchanged.
Set the action test state to true for audio type: mpeg-4
if true
Set Variable 1 to "MPEG-4"
else
Set the action test state to true for audio type: aiff
if true
Set Variable 1 to "AIFF"
else
Comment every other type has only one extension
Get Property File Extension -> Variable 1
Case UPPER in Variable 1
endif
endif
You can force the 'Year - Album' into a variable as follows:
Set Variable 2 to "\[Year] - \[Album]"
Note that when entering the above in the Set statement use the context menu 'Insert Yate Field' submenu to insert the fields correctly. If you look at this in an email as opposed to the forum, the backslashes are typically missing.
If you do any combination of the above you will have the 'format' in variable 1 and the 'year - album' in variable 3. Along with 'Artist' you now have three path components. You can use a Move statement which specifies the three paths and a rename template to do the filename. That should do what you want.
If the group of files is not consistent in the results you'll get for variable 1 and variable 3 make sure to put a 'Force Grouped' statement as the first line of the action to handle each file individually.
|