Replacing the first x number of characters

A swapping-ground for Regular Expression syntax

Replacing the first x number of characters

Postby jata02 » Sat Jan 04, 2014 10:18 pm

Hello- I did some searching but have come up blank (could be my searching skills)

I am trying to clean up my music files and run across files names like

2-02 songname.mp3
2-04 songname.mp3
and so on.

Would anyone like to help me with a regular expression to replace the first # of characters in a file name with whatever artist name. Instead of specifying that I want to replace 2-02 I would just like to say replace the first 4 characters with Artist.

to change
2-02 songname.mp3
2-04 songname.mp3
to
Artist - Songname.mp3

I have around 10k files to rename so this would figuratively save my life!

Thanks!
jata02
 
Posts: 1
Joined: Sat Jan 04, 2014 10:11 pm

Replacing the first characters with ID3 Tag Artist MP3

Postby Stefan » Sun Jan 05, 2014 12:04 am

Hi welcome.


FROM:
2-02 songname.mp3
TO:
Artist - Songname.mp3


USE:
Remove(5) First [ 4]
Add(7) Prefix [ Artist -]

















Or rather try this
Remove(5) First [ 4]
Add(7) Prefix [ %r -]
:D

Just search the help or the forum for 'artist' or 'ID3' and you had get it yourself in no time.

The Main Screen

If you are processing MP3 files, you can also extract certain ID3 tags (n.b. only V1 and V1.1 ID3 tags are supported).
These are specified using substitution tags, which you key into the Prefix, Insert or Suffix boxes (box 7).
The tags current available are:

%r - Artist
%l - Album
%t - Title
%k - Track Number


-------------------------------------------------------------------------------------------------------

Options Menu

Extract ID3 Data

Use this option to say whether or not ID3 (Version 1) tags will be extracted from MP3 files.
At present only Artist, Album and Title are extracted, but even this can slow down the processing a lot.
If you don't need these fields then leave this option un-ticked to speed up the processing.





.
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Re: Replacing the first x number of characters

Postby vin » Wed May 27, 2015 10:09 pm

Hi,

I tried everything to change my music filenames according to my wishes, which are:
- Remove track numbers
- Add Artist if missing

So i did the following:
- Remove first 4
- Add prefix %r

The tracknumbers are indeed gone, but there is no artist name popping up!

I did extract the ID3 tag, and I am sure the files have ID3 information.

I am on a 64bit system using the 64bit version of the program, maybe this is the issue (http://www.bulkrenameutility.co.uk/forum/viewtopic.php?p=5281#p5281)?

Please help.

Thanks.

Vince
vin
 
Posts: 1
Joined: Wed May 27, 2015 10:05 pm

Replacing the first x numbers / MP3 Extract ID3 Data

Postby Stefan » Thu May 28, 2015 6:42 am

vin wrote:So i did the following:
- .....
- Add prefix %r

...., but there is no artist name popping up!

I did extract the ID3 tag, and I am sure the files have ID3 information.


Maybe that:

Stefan wrote:
The Main Screen
If you are processing MP3 files, you can also extract certain ID3 tags (n.b. only V1 and V1.1 ID3 tags are supported).
.

... ... ... only V1 and V1.1 ID3 tags are supported

Maybe you have only v2.x set? Can you check that? (you can also copy most of v2.x parts to v1.x ID3-tags) Thanks.




Or maybe just this:
Options > Extract... > ID3 Data
The options menu provides you with a variety of methods to customise the application.
These are described below.

Options > Extract... > ID3 Data
Use this option to say whether or not ID3 (Version 1) tags will be extracted from MP3 files.
At present only Artist, Album and Title are extracted, but even this can slow down the processing a lot.
If you don't need these fields then leave this option un-ticked to speed up the processing.



 
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU


Return to Regular Expressions