I have my Year tag in the iTunes format. Eg 2014-07-31T07:00:00Z.
I want to create folders of all files in the format "Year - Album name", but when I create an action of the type Format value, I used %year% - %album%%_FILENAME%, with _FILENAME in field., but it generates that confusing format.
What expression should I use, to pick up only the first 4 digits, or at lease what's before "-"?
Why do you include the filename in the folder name?
Aren't there many files in the folder?
The format of the year that you show is actually the format for RELEASETIME. I would copy the data from YEAR to RELEASETIME and then cut the YEAR to just 4 digits as that is the format that the standard defines.
I actually wrote wrong, the action I really had was: Format Value: C:..%year% - %album%%_FILENAME%, so It kept the original filename and added each song to its album folder. Note that my songs are all in the same folder, that's why I could not just change the folder's name, because the folders don't exist.
The tag is really YEAR, and I tried
But none of them worked properly. What should I do?
so it would look like %_folderpath%\$left(%year%,4) - %album%\%_filename%
if you want to create the folders in the the same folder where your files are now.
If you want to create the folders elsewhere you have to use an absolute path for the new location.
As an alternative way you can use the converter Tag->Filename with the same format-string. There you have a preview which is very comfortable when you are testing format-strings.
If your year-tag is not always present you can take %_folderpath%\[$left(%year%,4) - ]%album%\%_filename%
In this case the content in the square-brackets is neglected.