#1 2009-10-16 23:25

DJRhinofart
Member
Registered: 2009-10-16
Posts: 1

Remove digits at the end of file

Ok, here is the deal. I have several thousand MP3s and WAV files that I used Mixed in Key to Analyze to give me the Key, and BPM. But a few backups and hard drive swaps later, I have a tonn of files with duplicated information in the filename. I was able to get the Keys out "5A, 9B, etc), but I can't for the life of me figure out how to get the BPM information out of the filename.

For example:
Guns N' Roses Don't Care About You 191.83.mp3
Haddaway Mama's House 90.91.mp3

As you can see, they are always 2 or 3 digits (decimal) 2 Digits.mps

Is there some formula or rule that can strip out the 2 or 3 numeric characters, decimal, and 2 numeric characters while leaving everything else intact? Also, anything that can take out the duplicate information? IE  The Way I Am 87.42 87.42.mp3

BTW. I love this program!

Last edited by DJRhinofart (2009-10-16 23:34)

Offline

#2 2009-10-17 00:49

prologician
Member
Registered: 2009-01-30
Posts: 84

Re: Remove digits at the end of file

First off. Welcome to the den4b forums. smile For future reference, I suggest that you post requests for help in the "Help and Support" forum, since this is clearly a request for help. (To anyone who has mod powers.... this thread should be moved~ wink )

Since your beats-per-minute info is always at the end, you can use a regular expression to take care of that. smile

Expression: \s*\d{2,3}\.\d{2}$
Replace: [Leave this one empty]

[X] Skip Extension

The "\d" indicates a digit, and the {} indicates how many times to repeat. It pretty much behaves the way you're describing there. (It also removes the spaces immediately before the BPM info.)

To get rid of duplicate BPM info, can just duplicate this rule again. (It was for this reason that I removed the excess spaces... hehe.)

Offline

#3 2009-10-24 09:16

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: Remove digits at the end of file

Or... changing this:
\s*\d{2,3}\.\d{2}$

to this:
(\s*\d{2,3}\.\d{2})+$

You won't need to duplicate the rule smile


If this software has helped you, consider getting your pro version. :)

Offline

Board footer

Powered by FluxBB