Insert "_" After 2 #


#1

How do I insert or remove 2 numbers in a filename string from the start while keeping the rest of the filename intact?

Ex: 7101 to 71_01

or

Ex: 1971_001 to 71_01

?

Thanks, Donald


#2

Donald, first you may look for other tools to do this renaming thing right on the filesystem layer.
This might be easier than doing it by Mp3tag, try out Total Commander.

Using Mp3tag try the following algorithm:
  1. Create an Actiongroup and name it to 'TEMP field create and remove'.
  2. Create an Action mode Tag Field Formatting:

    Field: TEMP
    Formatstring: $left(%filename%,$sub($strchr(%filename%,' '),1))

  3. Create an Action mode Tag Field Formatting:
    Field: TEMP
    Formatstring: $iflonger(%TEMP%,4,$mid(%TEMP%,3,2)''$right(%TEMP%,2),$left(%TEMP%,2)''$right(%TEMP%,2))
  4. Create an Action mode Tag Field Formatting:
    Field: TEMP
    Formatstring: %TEMP%' '$right(%_filename%,$sub($len(%_filename%),$strchr(%_filename%,' ')))
  5. Create an Action mode Tag Field Formatting:
    Field: _FILENAME
    Formatstring: %TEMP%
  6. Create an Action mode Tag Field Remove:
    Field: TEMP
  7. Run the Actiongroup 'TEMP field create and remove' against your selected files.
    Afterwards all selected files should have a proper formatted filename.
    If there was any problem on renaming the files you may Undo the last operation [Ctrl+Z]
  8. Ready.
DD.20060806.1255
DD.20060808.0540 Edit