QUOTE (Marcabove @ Jan 31 2012, 22:52)
If I understand this I can also use this to do the same thing but with folder names also? If the folder is formatted "448) Cheap Trick ~ In Color (1977)" and the album is only "In Color" I can extract the "448)" and make the album name "In Color (No. 448).
Yes, if you understand this, you can.
Filter:"%_directory%" MATCHES "^(\d+)\)\s+(.+?)\s+~\s+(.+?)\s+\((\d+)\)$"
Action: Format value
Formatstring: $regexp(%_directory%,'^(\d+)\)\s+(.+?)\s+~\s+(.+?)\s+\((\d+)\)$','$3 (No. $1)')
Keep in mind, that renaming a folder is not only the process of giving the thing a new name, but it can result into a moving of the folder to another place in the file system. I rate this as a critical action and one must be careful what to do.
As user 'ohrenkino' said in this thread, for the long shot, it would come in handy, that all relevant data are stored within the media file in tag-fields.
Once this situation has been created ...
"448" ... put into ... CATALOG_ID
"Cheap Trick" ... put into ... ARTIST
"In Color" ... put into ... ALBUM
"1977" ... put into ... RELEASEDATE or maybe YEAR
.. then the renaming resp. moving of the folder can be done this way ...
1. Probably there is no need to apply a filter.
2. Apply an action "Format value".
Formatstring : %ALBUM%' (No. '%CATALOG_ID%')'
.. that's it.
How to get data from filename or foldername and put it into the tag-fields within the media file?
Use Mp3tag converter "Filename - Tag".
This converter can handle the names of folders or directories too, when formatting a mask, that represents a path string.
Fill the edit field with this format mask (each literal character is taken as is, no scripting functions allowed)
...%CATALOG_ID%) %ARTIST% ~ %ALBUM% (%YEAR%)\%DUMMY%
... then the converter preview shows ... CATALOG_ID 448
ARTIST Cheap Trick
ALBUM In Color
In this example the format mask represents the filesystem path situation of "folder\filename".
The placeholder %DUMMY% stands here for the filename, and discards the filename.
But the filename can be disassembled the same way by applying an appropriate format mask.