Printable Version of Topic
-Brading Software Message Board +--Forum: Mp3/Tag Studio Support and Bug Reports +---Topic: Manipulating strings started by John Seymour Posted by: John Seymour on 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 Posted by: Skirge01 on 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 Posted by: John Seymour on 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 Posted by: Skirge01 on 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! ![]() George p.s. I'm wondering if there's a simpler way we're both overlooking??? Posted by: Magnus Brading on 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... end |