-> Home

Adjust ID3 tags and filenames automatically

Release: 0.11

features download installation usage examples history todo contact

Description


Download

This program is distributed under the terms of the
GNU GENERAL PUBLIC LICENSE.

ZIP file with REXX script and this guide: Version 0.11


Installation


Usage

mp3tag [filemask] [options]

If filemask is omitted *.mp? is used.

command line
description
/s Include subdirectories
/ntemplate Naming convention [1]
This is the filename (including path) for all MPEG files. It may contain the following metacharactes[2]:
%a    Artist name
%t Song title
%A Album name
%T Track number (two digits)
%y Year
%c Comment
%. Current directory including trailing \
%\ Directory of the file including \
%$ Filename without extension
%~ File extension including .
%% % itself
Further examples
/n0 Shortcut for /n%.%a\%t%~
Sort files by artist\title.mp3. (default)
/n1 Shortcut for /n%.%a\%A\%T - %t%~
Sort files by artist\album\track - title.mp3.
/n2 Shortcut for /n%.%A\%T - %a - %t%~
Sort files by album\track - artist - title.mp3.
/oaartist Overwrite artist
/oAalbum Overwrite album
/oyyear Overwrite year
/occomment Overwrite comment
/osstyle Overwrite style
Only by number!
/u Update ID3 tag from filename
Priority: parsed filename, old ID3 tag (if any), overwrites (/o...)
/U Update ID3 tag from filename
Priority: old ID3 tag (if any), parsed filename, overwrites (/o...)
/!_ [3] or
/\_
Do not convert underscores in filenames to spaces
This is done by default. However, this utility will never create underscores instead of spaces.
/ac Automatic case conversion
Convert first character of all words to uppercase. This applies only to artist, album and title and not to overwrites (/o...).
/!cp [3] or
/\cp
Disable codepage translation
By default, all MP3 tags are converted from the ISO-8559-1 (Windows) charset to the OS/2 codepage on read and vice versa on write.[4]
/eatype set file type extended attribute (.TYPE) to type
/pm Use the PMshell for file renaming & moving
There are two distinctions to the default method (MOVE command):
- First, the mapping for special characters which are not allowed in filenames is different. However, in both cases the .LONGNAME EA will contain the exact name. Furthermore, the .LONGNAME EA is normally only created on demand.
- Secondly, the MOVE command will fail, if the destination is on a different volume whereas SysMoveObject will not.
/t Truncate trailing zeros
Sometimes I got files with some trailing zeros after the ID3 tag. This switch will try to remove them automatically and above all enable the ID3 tag to be recognized at all.

Notes:

  1. The ID3v1.x tag have a restriction of 30 characters per field. When renaming files mp3tag tries to keep longer items by searching the old file and path name for the remaining characters.
  2. The escape character * may be used alternatively instead of % because the latter is usually the shell escape for environment variables. In fact ther is no way to pass a % as parameter in a WPS program object.
  3. If you use the FileCommander shell, remember that ! is an escape character there. You need to type !! instead. Alternatively you may use a backslash.
  4. The documentation of the ID3v1.x tag structure does not mention the codepage problem. But however, ID3v2 tags are using ISO-8559-1, which is similar to the one used by Windows and Linux systems. Usually the ID3v1 tags are also ISO-8559-1 format. Use \!cp if you have (or want to have) ID3 tags with the OS/2 codepage.


Examples

Renaming and moving files:

mp3tag /s
Rename and move all mp3 files in the current directory and all subfolders according to the rule .\artist\song.*.
mp3tag "/n%.MP3s/%a& - %t" /ea
Rename and move all mp3 files in the current directory to the folder MP3s according to the rule .\MP3s\artist - song, set the .TYPE EA to MPEG-Audio and remove the file extension as OS/2 don't need it.
mp3tag /n1 /aT
Rename all mp3 files in the current directory according to the rule .\artist\album\track - song.*.
mp3tag /n2 /aT
Rename all mp3 files in the current directory according to the rule .\album\track - artist - song.*.

Modifying ID3 tags:

mp3tag MP3s\* /u "/ocencoded with lame 3.90a7"
Set the comment tag of all files in the directory MP3s to encoded with lame 3.90a7
mp3tag /u /s "/n%.%A\%T - %a - %t%~"
Update the ID3 tags of any MP3 file in the current directory including subfolders. The folder name where the files are found is considered to be the album name. The file names are parsed as track - artist - song. However, any existing parts of the ID3 tag are kept.

History

Version 0.11

Version 0.1


ToDo

Handle ID3v2 tags
ID3v1 tags have the unpleasant disadvantage that the items are restricted to 30 characters. This is casually insufficient. ID3v2 tags do not have such restrictions. Unfortunately they are much more complicated, in particular with the REXX language.

Contact

Suggestions, help, complaints (but not too much:-): mueller@maazl.de

Original homepage: http://www.maazl.de/project/mp3/mp3tag.html