Not sure if this is even possible, but...

Ahoy all. Long time.

The easy part:
Looking to rename album folders so that they're as so: (%year%) %album%
That i can do. Easy.

The harder part:
There may be artist folders with tracks in the root / not in an album folder, which causes issues with renaming. The issue is when there is said loose track with album tag info. Renaming as above causes a new folder to be created one level up in the same dir as the artist, which is not ideal.

Is there a way to only process files in an existing album folder?
Maybe have MP3tag check that the dir for files does not match %artist%?

I'd go through my collection to check for loose files and fix them, but i have a large collection and this could take a LONG time...

yes, you can check if the %artist% matches the artist, as you propose.
or you can check the folder level

you can do these checks with the filter to show only the files of one category, or you can run your actions blind with a $if function which applies only to one category.

Thanks for replying so fast :slight_smile:

I guess my next question is: How do i do that? Looking at regular expressions hurts my head. I'm really very bad with code or anything similar.

..Though i'm not sure what the best check would be; Folder level or %artist% - What do you think? I'm leaning towards folder level.

So a valid directory would have to be:
X/music/grouping/artist/album/file.mp3
and not:
X/music/grouping/artist/file.mp3

I would use the filter with folder levels

Filter: press F3
examples:

%_folderpath% MATCHES music\\grouping\\.+\\.+\\
(= folder is two levels below your root folder)

NOT %_folderpath% MATCHES music\\grouping\\.+\\.+\\
(= folder is not two levels below your root folder)

%_folderpath% MATCHES music\\grouping\\.+\\
(= folder is one level below your root folder)

an actions example without filter:

Format Value
Field: _DIRECTORY
$if($eql(%artist%,%folder%),,%artist% (%year))

EDIT:
(this would only rename folders which are not identical with the artist name.)

I think my filter examples are wrong. These should work:

%_folderpath% MATCHES music\\grouping\\[^\\]+\\[^\\]+\\$
(= folder is two levels below your root folder)

NOT %_folderpath% MATCHES music\\grouping\\[^\\]+\\[^\\]+\\$
(= folder is not two levels below your root folder)

%_folderpath% MATCHES music\\grouping\\[^\\]+\\$
(= folder is one level below your root folder)

First: Thank you for helping and replying so fast :slight_smile: It really is appreciated.

I can't get any of those filters to work for me. They all show nothing.

A real example of a file path:
F:\Music\Industrial\General\Nine Inch Nails

I applied all the filters above, but none seemed to work.
The action example threw up syntax-errors, then put all the files into one folder.

This is all very confusing for me.

you have seen second post where I corrected my own filters?
anyway, you have one folder level more than I thought ("General")

all files in the Nine Inch Nails folder:
%_folderpath% MATCHES music\\Industrial\\General\\Nine Inch Nails\\$

all files one folder level below the Nine Inch Nails folder:
%_folderpath% MATCHES music\\Industrial\\General\\Nine Inch Nails\\[^\\]+\\$

the same more general:

all files three levels below your music folder:
%_folderpath% MATCHES music\\[^\\]+\\[^\\]+\\[^\\]+\\$

all files four levels below your music folder:
%_folderpath% MATCHES music\\[^\\]+\\[^\\]+\\[^\\]+\\[^\\]+\\$

these are filters with general expressions.

\\ is simply "" it has to be escaped in regular expressions, so it is double.
[^\\] is any other character than ""
+ is a repetition,
so [^\\]+ is a sequence of characters without "", so here any foldername
$ is the end of the string, so here, the end of the folderpath

Thanks. I shall have to look into that tomorrow when I have time.