Mr.C suggested that I post about this, and after first demurring, I thought 'why not?', especially because the process becomes more complex as I address more Media Types and I could use some more help!
The first thing I did was try to create an
expression(wiki link) that would move all files based on their Media Type, but I've realised that the expression would become massive an unwieldy if I ever wanted to change anything, so I'm doing it on a per-media-type basis now.
The way I'm implementing it is to create a series of
calculated fields(wiki link) which I then string together in a final expression which allows me to make changes to things in easy-to-manage chunks.
To get started, I use this expression to determine the base folder for each media type (I'm using quote markup because it's easier to read):
ifelse(isequal([media type],Audio),
D:\AUDIO\,
isequal([media type],Video),
\\ShackServer\VIDEO\,
isequal([media type],Image),
if(isequal([sub-type],Film Still),
\\ShackServer\VIDEO\Film\,
D:\IMAGE\),
1,
D:\DOCUMENTS\MISCELLANEOUS\)
I should point out that I use some alternative takes on some standard MC fields, like [sub-type] instead of 'media sub type', for some added flexibility.
Anyway, this expression (used in a field called 'Move Base Path'), goes like this, in more understandable terms:
If
Audio > D:\AUDIO\
otherwiseIf
Video > \\ShackServer\VIDEO\
otherwiseIf
Image & If Sub Type =
Film Still > \\ShackServer\VIDEO\Film\
If Not
Film Still > D:\IMAGE\
otherwise>D:\DOCUMENTS\MISCELLANEOUS\
The reason for the little 'shimmy' for images of sub-type 'Film Still' is that I want to keep film-still images in their own folder with the video files.
For people less familiar with what I'm trying to do here: Basically all you want to get out at the end of this expression is a string of text that you could, if you wanted, paste into a Windows Explorer address bar to be taken straight to the Folder. The expression doesn't actually
do any renaming, it's just a way of telling MC how you want things renamed when you use the Rename/Move/Copy feature.
With that in mind, all this expression does is create one of the following possible strings to place at the beginning of the renaming string, depending on the media type:
D:\AUDIO\,
\\ShackServer\VIDEO\,
\\ShackServer\VIDEO\Film,
D:\IMAGE\
D:\DOCUMENTS\MISCELLANEOUS\
On to the next part of the string... This is where it gets complicated, and I have spent hours staring at expressions wondering where the hell they've gone wrong, but there are a few things which help me:
- 1 - I use NotePad++ as a text editor in Windows, and I've created a language definition which presents the expressions in a much more readable way
- 2 - I make much use of the ability to create temporary expression columns in the file list for testing expressions
- 3 - I create a calculated field called '_test', so it shows up at the top of the field list for quick access
(If anyone wants a copy of that NotePad++ file to import, you can get it here:
link)
AUDIO FOLDERS
So, the next part is to tell MC where to put things like TV Shows, Audiobooks, Music and Photographs. I'll deal with Audio first, and I have to thank Mr.C for his help on this one. First, here's the expression:
if(isequal([sub-type],Audiobook),
AUDIOBOOK\[Artist]\ifelse(!isempty([Series Title]),[Series Title]\[Book #] - )[Album],
if(isempty([sub-type]),
MUSIC\if(isequal([source],archive,8),ARCHIVE,ACQUIRED)\[AssortedOrArtist]\[Album],
MISC\[sub-type]\ifelse(!isempty([Artist]),[artist]\,!isempty([Album]),[album]\,1,)))
And here's the more readable version:
If
Audiobook >
AUDIOBOOK\Artist\ If
Series Title >
Series Title\Book # - Album otherwise
>
AlbumotherwiseIf
Sub Type Empty >
MUSIC\ If
Source = archive >
ARCHIVE\Artist\Album otherwise >
ACQUIRED\Artist\Albumotherwise>
MISC\Sub Type\Artist\Album (only if 'artist' and/or 'album' are not empty)
And here's what it the rename string looks like now:
Audiobooks in a series; | D:\AUDIO\AUDIOBOOKS\Artist\Series Title\Book # - Album\ |
Audiobooks NOT in a series; | D:\AUDIO\AUDIOBOOKS\Artist\Album\ |
Music ripped from my CD collection; | D:\AUDIO\MUSIC\ARCHIVE\Artist\Album\ |
Other music; | D:\AUDIO\MUSIC\ACQUIRED\Artist\Album\ |
Any other type of audio; | D:\AUDIO\MISC\Sub Type\Artist\Album\ - unless Artist or Album is empty, in which case either or both are omitted |
If you're wondering what 'AssortedOrArtist' is, it's another calculated field to emulate the 'Use "Assorted" instead of "Artist" on multi-artist files' feature in rename/copy/move. The expression looks like this:
if(IsEmpty([artist]),
if(IsEmpty([album]),
Unknown Artist\Unknown Album,
Unknown Artist\[album]),
If(IsEqual(Mid([album type]),M),
Assorted,
[artist])\if(IsEmpty([album]),
Unknown Album,
[album]))
The reason for this is that that feature won't work when using an expression in the 'Rule' box. I'm sure it could be streamlined too, but it serves for the moment.
And that's it for Audio files - apart from the filenames themselves, of course
. So far only directories have been addressed.
VIDEO FOLDERS
My Video requirements are quite similar to my Audio ones. My basic setup is:
\Film\
\TV Show\
\Misc\Sub Type\
So my Video Folder expression looks a lot like the Audio one:
if(isequal([sub-type],Film),
FILM\ifelse(!isempty([series title]),[series title]\[episode #] - )[name]\,
if(isequal([sub-type],TV Show),
TV SHOW\[tv show]\ifelse(!isempty([series #]),[series #]\,1,),
MISC\[sub-type]\ifelse(!isempty([Artist]),[artist]\,!isempty([Album]),[album]\,1,)))
The basic logic is:
If it's a film, do A
If it's a TV Show, do B
Otherwise do C
Part 'A', as for Audio, inserts "Series Title\Episode # - " into the string only if Series Title is not empty (for film series like Star Wars, The Bourne Trilogy, etc.). Otherwise it creates a folder with the film's name
Part 'B' only creates a Series # folder if Series # has a value (for series like 'Cosmos' or 'Planet Earth' or 'Firefly' which don't have more than one series)
Part 'C' is exactly the same as for Audio.
That's it for Videos. The result is this:
Films in a series; | \\ShackServer\VIDEO\FILM\Series Title\Episode # - Name\ |
Films NOT in a series; | \\ShackServer\VIDEO\FILM\Name\ |
TV Shows | \\ShackServer\VIDEO\TV SHOW\TV Show\Series #\ |
Any other type of video; | \\ShackServer\VIDEO\MISC\Sub Type\Artist\Album\ - unless Artist or Album is empty, in which case either or both are omitted |
Images and more are dealt with two posts down:
link