Triming last 3 chars of a filename

Hi
I've searched a solution for my problem but could not find any.
I have a large number of mp3 files were the filename has the track number added to them, some at the beginning of the filename and some at the end.

Im trying to use the Filename->Tag function to copy the filename so it is the title tag of the song but without the track number.

for example, I have filenames: 01 Cry.mp3, or Cry 01.mp3.

So my question is how can I do a batch removal of the 01 and same the title to be Cry?

As the pattern is different in your filenames you have to do it in two runs - one for the files with the track number in front and for those at the end.

The mask for track number at the front:
%track% %title%

The other one is more tricky as it is not clear how many words are in front of the number.
So, what I would do:
Put the whole filename into TITLE with the Convert>Filename-Tag function.
Then run a "Replace with regular expression" action for TITLE to remove the number
Search string: (.*) \d+$
Replace string: $1
Then use the Convert>Tag-Filename function to rename the file, if you like.

  1. Copy all the filenames to the tag-field TITLE.
Convert "Filename - Tag"

Formatstring: %TITLE%


... or ... Action "Format value" or Convert "Tag - Tag"

Field: TITLE
Formatstring: %_FILENAME%

  1. Set Filter [F3] to display only files for the first case (cut left).
Filter: TITLE MATCHES "^\d\d\s.*$"
  1. Change the content in the tag-field TITLE.
Action "Format value" or Convert "Tag - Tag"

Field: TITLE
Formatstring: $cutLeft(%TITLE%,3)

  1. Set filter [F3] to display only files for the second case (cut right).
Filter: TITLE MATCHES "^.*\s\d\d$"
  1. Change the content in the tag-field TITLE.
Action "Format value" or Convert "Tag - Tag"

Field: TITLE
Formatstring: $cutRight(%TITLE%,3)

DD.20140531.1120.CEST

I tried these but the cutLeft/cutRight only cuts the chars and not the digits.

This status indicates that something in your environment is not so given as you have it described.
Try again.

Use these filenames for testing ...
01 Cry.mp3
02 Cry more.mp3
03 Cry ever.mp3
Cry never 06.mp3
Cry once 04.mp3
Cry once more 05.mp3

... and you will get the result in the tag-field TITLE ...
Cry
Cry more
Cry ever
Cry never
Cry once
Cry once more

Be aware of the fact, that the functions $cutLeft and $cutRight will do their work on every run.
After a second run you will get the result in the tag-field TITLE ...

more
ever
Cry ne
Cry o
Cry once m

DD.20140531.1828.CEST, DD.20140531.2056.CEST