» Welcome Guest
[ Log In :: Register ]

 

[ Track this topic :: Email this topic :: Print this topic ]

Topic: Manipulating strings, How & where to do it?< Next Oldest | Next Newest >
John Seymour
Unregistered





Posted: Aug. 17 2002,00:31

Still a little confused...

I have 2500 MP3 files. Some have Artist or Album titles that start with the word "The " which I wish to remove. I have sucessfully filtered them to show only those files that match, but how do I do the 'replace' operation in the relavent tag fields just to remove "The " and the beginning of the existing field?

Regards


John
Back to top
Skirge01
Board Buff



Group: Members
Posts: 55
Joined: Aug. 2002
Posted: Aug. 17 2002,07:14

Hi John...

To do this, you need to use the "Case fix and replace" option.  Once you go in there, you'll be able to set it up to do whatever you want.  Note that if you want both the filenames and the ID3 tag to be changed, you'll have to run both "Direct rename files" and "Direct tag manipulation" with the case fix and replace options.

George
Back to top
Profile PM 
John Seymour
Unregistered





Posted: Aug. 17 2002,20:36

Yes, I spotted that. But how do I ensure it's the "The" only at the beginning of the string that gets replaced (removed). Using a replace string of "§The " that would work when filtering files doesn't seem to work in this dialogue...

John
Back to top
Skirge01
Board Buff



Group: Members
Posts: 55
Joined: Aug. 2002
Posted: Aug. 18 2002,00:10

John,

You got me there!  I didn't consider that issue.  Two ideas come to mind:

1.  This assumes you have no files with a leading space in any field you're working with AND that you don't have it set up like this:

Artist - Album - Title.mp3

If you have the spaces before and after the '-', you'll need to remove those first and put them back afterwards.

Now, to do this, you could use the substring replacements and make ' the ' or ' The ' (noting the leading and trailing spaces) all capitals. Then use the same function and replace 'The' (case sensitive) with a character (i.e.  ? ! \ ^) you don't have in any of the fields you're working on.  Run it again and put in whatever character you chose as the "Replace" and delete everything from the "With" (make sure there's not a blank space in there).  Run it one last time and do a case fix on the "THE" you capitalized to make it what you would normally have it as.

2.  If you know DOS, you could use the REN command with wildcards to strip the word out.  Then just rename the fields according to the filenames.  (If you don't have albums in your filenames this obviously won't solve that issue unless you put them in.)  Use #1 if you aren't familiar with DOS.

You're doing something fairly complex, so it's not so easy.  Although, it might be nice to have an option to look at only the first or last "word" in a field.  I don't know how difficult that would be to program, though.

Let me know if this works out for you.  Make sure you do a PREVIEW on each step!!!  I certainly may have missed some condition that would cause an undesired result.  I don't want to get yelled at if it doesn't work!  :D  I always copy the files I'm going to be working with to another place, that way if I totally screw them up, I can go back to the originals.  Undo is nice, but Windows sometimes crashes before you can undo (or in the middle of it).

George
p.s.
I'm wondering if there's a simpler way we're both overlooking???
Back to top
Profile PM 
Magnus Brading
Almighty Author



Group: Super Administrators
Posts: 2751
Joined: Aug. 2002
Posted: Aug. 18 2002,03:14

Always nice to see creative solutions to problems like this George. :)

Better support for "word extraction" and "first and last word" settings is planned for the replace tool in a future update. Stay tuned...

--------------
Software author and website owner
Back to top
Profile PM WEB 
4 replies since Aug. 17 2002,00:31 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]