You are currently at The Leminator's foobar tips section!

Back to the main page

Back to the a/v page

Back to windows players

Foobar 2000: Tips'n'Tricks


Mass-renaming files and/or tags

1. Tagging (go to 2. renaming)

Re-tagging a bunch of files at once is easy in foobar, just add them to a playlist, select them all, right-click and select properties.

You can then just double-click on the field you want to change. Enter the new value, click ok followed by update files and the tags will be changed.

In this case, I changed B-52's into B-52's, the. This is a fairly common operation: it makes sure all artist tags will be in the same format. (artist, the instead of the artist or even just plain artist).

Now let's say you want to do this for several albums and artists at once. Our starting situation is a collection of files from different artists, all named in the format 'the artist'.

Swapping 'the artist' with 'artist, the'
Original name: Change into:
The Rolling Stones Rolling Stones, the
The B-52's B-52's, the
The Band Band, the
The Black Crowes Black Crowes, the

One solution is obviously to select by artist and then re-tag all the files with the same artist. It would be easier if we could just select all files and have them re-tagged all at once. This is where foobar's masstagger comes into play.

Select all files, right-click on them and select masstagger - edit tags. In the actions to perform, click on add. Select format value and configure it like this:

If you do not understand this, please see the help for the tagz-language which is available in foobar under preferences / display / title formatting / help. What we're doing here is taking what's in the ARTIST tag, and re-formatting it so that it will start from character 5 (T=1, h=2, e=3, <space>=4) up till the end, add a comma and a space and put characters 1 till 3 (The) at the end.

(If you want to do the reverse, you'll need to use a slightly different strategy. Take the full string, cut off the last 3 characters (or 5 if you have ', The') and use 'right(%artist%,3)' to start.)

If you'll be performing this operation frequently, you can save this operation in foobar:

At the bottom of the masstagger window, type a name for the action you defined. Then click on 'save' or 'save to file' depending on how you want to keep it.

<top of page>

2. Renaming (go to 1. Tagging)

Being able to change all these tags is obviously pretty good, but it would be nice if we can rename the files also. Say you have a directory structure like this:

dirtreeYou now have all you music in a nice artist/album/song title format. However, several of your files are now tagged in the format 'artist, the' while they are still in a directory 'the artist'. What we would like to do is rename the first directory (the one with the name of the artist) so that it reflects our 'artist, the' tag. Furthermore, we not only want all existing files moved to these new directories but also for the old empty directories to be automatically deleted.

 

 

 

 

 

 

This too can be easily accomplished with foobar's masstagger. Right-click on the files you want to rename and select move, rename or copy files.

Create a new file naming format if you want or use one of the existing ones. I added the following to my configuration:

This will put all files into an artist\album directory hierarchy with individual files being named in the format 'track number. title'

Use the 'create subdirectories', 'remove empty directories' and 'output directory' fields as you see fit. In my case, I wanted to create subdirectories when a / or \ is used, the empty directories removed and all files to be put relative to one root folder.

It needs no mentioning that you might want to test on one or two files before launching this against your entire music collection :)

 

<top of page>