Welcome Guest
[ Log In :: Register ]

 

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

Topic: Macro Help / Request< Next Oldest | Next Newest >
lordsecret
Board Newbie



Group: Members
Posts: 7
Joined: Aug. 2002
Posted: Mar. 24 2005,16:18

I'm looking for help in creating a macro to do a number of things.

First, I would like it to be able to parse the ID3 tag to check for the existence of information in multiple fields (Artist/Album/Title/TrackNr).

If all those fields are populated, then I want to create folders and rename the files based on my rename template ---- <Artist> - <Album> <\><Artist> - <TrackNr> - <Title>.mp3

Any help or advice would be most appreciated.

Thanks,
Tyke Beard
Back to top
Profile PM 
Magnus Brading
Almighty Author



Group: Super Administrators
Posts: 2751
Joined: Aug. 2002
Posted: Mar. 28 2005,11:48

Simply use the auto rename tool with a filter that requires all these fields you mention, and use the template you mention above. Run the operation once while recording a macro, and you now got your working macro for this operation, which you can post here for others to download and use. :)

--------------
Software author and website owner
Back to top
Profile PM WEB 
lordsecret
Board Newbie



Group: Members
Posts: 7
Joined: Aug. 2002
Posted: Mar. 28 2005,18:41

Aside from the special character are any other wild cards available?

I'm having trouble trying to define that the field should have contents equal to or containing any characters.

Thanks for the response!
Tyke Beard
Back to top
Profile PM 
Magnus Brading
Almighty Author



Group: Super Administrators
Posts: 2751
Joined: Aug. 2002
Posted: Mar. 28 2005,20:32

You said you wanted a file to pass the filter if certain fields was populated, i.e. not empty. You can perform this check by simply telling the filter that these fields should not be "equal to empty", if you understand what I mean?

--------------
Software author and website owner
Back to top
Profile PM WEB 
lordsecret
Board Newbie



Group: Members
Posts: 7
Joined: Aug. 2002
Posted: Mar. 29 2005,06:31

Yes, I do know what you mean. I think I've got it now, thanks for all your help!

Tyke Beard
Back to top
Profile PM 
Llamatron
Board Veteran



Group: Members
Posts: 67
Joined: Sep. 2004
Posted: April 11 2005,01:33

Hi! Love the program -- it's very versatile. I'm stumped, though; between the helpfile and GUI I'm not seeing a way to do this (although the details above gave me a start in the right direction). I'm trying to parse a list of filenames (created in MP3/TS) and change all underscores to spaces, all %20 to spaces, and capitalize the names (using the case fix template). I don't see any way to do that even with the macro recorder.

If they're MP3s that already have tags, that's easy, but if they're MP3s that don't, all the filenames would have to follow a specific format to tag 'em and then use the tags for renaming.
(I'm hoping to even possibly use it on all files, not just audio.) :idea:
Does anyone have any ideas, or is this just something Tag Studio can't deal with yet?

Here's an example filename:
The_Greatest_Duets_Ever_(2000)_-_17_-_18_-_Jimmy_Durante_&_Bob Hope.mp3

And this is the parsing template I used in this particular case since there were several identically formatted ones:
<Album>_(<Year>)_-_<TrackNr>_-_<TRASH>_-_<Artist>.mp3

But again, that wouldn't work on non-MP3s...  :)

Edited by Llamatron on April 11 2005,01:52
Back to top
Profile PM 
Magnus Brading
Almighty Author



Group: Super Administrators
Posts: 2751
Joined: Aug. 2002
Posted: April 12 2005,11:03

Simply use the "Direct rename files" tool with the two simple templates:

Expected:
<Custom1>

Output:
<Custom1>

And then activate the "Case fix and replace" option. Inside this option's settings, select the "Advanced" mode, make sure that "Custom field 1" is checked in the "Where to apply" box, and in the "Substring replacements" tab add any replacements you want, e.g. the one with the underscore and the one with %20.

Execute the tool and bam, all the things you want will be done in a second or so for hundreds of files (of any filetype, not just mp3-files).

To reach all this functionality from a single button in the future, just record a macro while doing it.

--------------
Software author and website owner
Back to top
Profile PM WEB 
Llamatron
Board Veteran



Group: Members
Posts: 67
Joined: Sep. 2004
Posted: April 12 2005,19:09

Thanks very much! :D  I'll spend some time working with it, and once I'm able to create a macro I'll post it.
Back to top
Profile PM 
Llamatron
Board Veteran



Group: Members
Posts: 67
Joined: Sep. 2004
Posted: April 25 2005,10:23

Here're a couple macros I've been having success with.

Remove "The" from the beginning of artist names:
Code Sample
MacroFileVersion=3506
[DirectRename]
TemplateIn=The <Artist> - <Title>.mp3
TemplateOut=<Artist> - <Title>.mp3


Fix filenames for any type of file (case, HTML leftovers and other oddities):
Code Sample
MacroFileVersion=3506
[DirectRename]
TemplateIn=<Custom1>
TemplateOut=<Custom1>
DoReplaceSpaces=FALSE
{Casefix}
CasefixMode=1
TrimEndSpaces=TRUE
CleanMultiSpaces=TRUE
ApplyToCustom1=TRUE
DoSubStringReplace=TRUE
NotToBeCapitalized1=a
NotToBeCapitalized2=an
NotToBeCapitalized3=and
NotToBeCapitalized4=as
NotToBeCapitalized5=at
NotToBeCapitalized6=but
NotToBeCapitalized7=for
NotToBeCapitalized8=from
NotToBeCapitalized9=in
NotToBeCapitalized10=into
NotToBeCapitalized11=nor
NotToBeCapitalized12=of
NotToBeCapitalized13=off
NotToBeCapitalized14=onto
NotToBeCapitalized15=or
NotToBeCapitalized16=over
NotToBeCapitalized17=the
NotToBeCapitalized18=to
NotToBeCapitalized19=up
NotToBeCapitalized20=with
NotToBeCapitalized21=(live)
NotToBeCapitalized22=(remix)
NotToBeCapitalized23=10cc
NotToBeCapitalized24=theme
NotToBeCapitalized25=alt
NotToBeCapitalized26=ver
NotToBeCapitalized27=version
NotToBeCapitalized28=(live
NotToBeCapitalized29=vs
AlwaysToBeCapitalized1=ufo
AlwaysToBeCapitalized2=fcc
AlwaysToBeCapitalized3=tv
AlwaysToBeCapitalized4=dui
AlwaysToBeCapitalized5=tlc
AlwaysToBeCapitalized6=dc
AlwaysToBeCapitalized7=ac
AlwaysToBeCapitalized8=nfl
AlwaysToBeCapitalized9=dc
AlwaysToBeCapitalized10=tlc
AlwaysToBeCapitalized11=vh1
AlwaysToBeCapitalized12=mtv
AlwaysToBeCapitalized14=pdq
AlwaysToBeCapitalized15=iii
AlwaysToBeCapitalized16=iv
AlwaysToBeCapitalized17= v
AlwaysToBeCapitalized18=vi
AlwaysToBeCapitalized19=vii
AlwaysToBeCapitalized20=viii
AlwaysToBeCapitalized21= ix
AlwaysToBeCapitalized22= x
AlwaysToBeCapitalized23=espn
AlwaysToBeCapitalized24=zz
AlwaysToBeCapitalized25=cc
AlwaysToBeCapitalized26=usa
RecognizedPrefixes1=mc
RecognizedPrefixes2=(
RecognizedPrefixes3=[
RecognizedPrefixes4= by
RecognizedPrefixes5={
SentenceTerminators1=!
SentenceTerminators2=?
SentenceTerminators3=.
CompoundingAtoms1=-
CompoundingAtoms2='
CompoundingAtoms3=
CompoundingAtoms4=`
CompoundingAtoms5=/
IgnoredWordSuffixes1=)
IgnoredWordSuffixes2=]
IgnoredWordSuffixes3=,
IgnoredWordSuffixes4=!
IgnoredWordSuffixes5=?
IgnoredWordSuffixes6=.
ExceptionPrefixes1=de
ExceptionPrefixes2=d
ExceptionPrefixes3=le
ExceptionSuffixes1='m
ExceptionSuffixes2='re
ExceptionSuffixes3='s
ExceptionSuffixes4='ve
ExceptionSuffixes5='ll
ExceptionSuffixes6='d
ExceptionSuffixes7='t
ExceptionSuffixes8='nt
ExceptionSuffixes9=m
ExceptionSuffixes10=re
ExceptionSuffixes11=s
ExceptionSuffixes12=ve
ExceptionSuffixes13=ll
ExceptionSuffixes14=d
ExceptionSuffixes15=t
ExceptionSuffixes16=nt
ExceptionSuffixes17=`m
ExceptionSuffixes18=`re
ExceptionSuffixes19=`s
ExceptionSuffixes20=`ve
ExceptionSuffixes21=`ll
ExceptionSuffixes22=`d
ExceptionSuffixes23=`t
ExceptionSuffixes24='ry
SubStringReplacementsFrom1="
SubStringReplacementsTo1=''
SubStringReplacementsCaseSensitive1=FALSE
SubStringReplacementsApplyBeforeCF1=FALSE
SubStringReplacementsMatchWholeWordsOnly1=FALSE
SubStringReplacementsFrom2=%20
SubStringReplacementsTo2=
SubStringReplacementsCaseSensitive2=FALSE
SubStringReplacementsApplyBeforeCF2=TRUE
SubStringReplacementsMatchWholeWordsOnly2=FALSE
SubStringReplacementsFrom3=10 cc
SubStringReplacementsTo3=10cc
SubStringReplacementsCaseSensitive3=FALSE
SubStringReplacementsApplyBeforeCF3=FALSE
SubStringReplacementsMatchWholeWordsOnly3=TRUE
SubStringReplacementsFrom4=:
SubStringReplacementsTo4=;
SubStringReplacementsCaseSensitive4=FALSE
SubStringReplacementsApplyBeforeCF4=TRUE
SubStringReplacementsMatchWholeWordsOnly4=FALSE
SubStringReplacementsFrom5=_
SubStringReplacementsTo5=
SubStringReplacementsCaseSensitive5=FALSE
SubStringReplacementsApplyBeforeCF5=TRUE
SubStringReplacementsMatchWholeWordsOnly5=FALSE
SubStringReplacementsFrom6=abc
SubStringReplacementsTo6=ABC
SubStringReplacementsCaseSensitive6=FALSE
SubStringReplacementsApplyBeforeCF6=FALSE
SubStringReplacementsMatchWholeWordsOnly6=TRUE
SubStringReplacementsFrom7=and
SubStringReplacementsTo7=&
SubStringReplacementsCaseSensitive7=FALSE
SubStringReplacementsApplyBeforeCF7=FALSE
SubStringReplacementsMatchWholeWordsOnly7=TRUE
SubStringReplacementsFrom8=b.b.
SubStringReplacementsTo8=BB
SubStringReplacementsCaseSensitive8=FALSE
SubStringReplacementsApplyBeforeCF8=FALSE
SubStringReplacementsMatchWholeWordsOnly8=TRUE
SubStringReplacementsFrom9=bb
SubStringReplacementsTo9=BB
SubStringReplacementsCaseSensitive9=FALSE
SubStringReplacementsApplyBeforeCF9=FALSE
SubStringReplacementsMatchWholeWordsOnly9=TRUE
SubStringReplacementsFrom10=ccp
SubStringReplacementsTo10=comedy central presents
SubStringReplacementsCaseSensitive10=FALSE
SubStringReplacementsApplyBeforeCF10=TRUE
SubStringReplacementsMatchWholeWordsOnly10=TRUE
SubStringReplacementsFrom11=Ii
SubStringReplacementsTo11=II
SubStringReplacementsCaseSensitive11=TRUE
SubStringReplacementsApplyBeforeCF11=FALSE
SubStringReplacementsMatchWholeWordsOnly11=FALSE
SubStringReplacementsFrom12=Iii
SubStringReplacementsTo12=III
SubStringReplacementsCaseSensitive12=TRUE
SubStringReplacementsApplyBeforeCF12=FALSE
SubStringReplacementsMatchWholeWordsOnly12=FALSE
SubStringReplacementsFrom13=Im
SubStringReplacementsTo13=I'm
SubStringReplacementsCaseSensitive13=TRUE
SubStringReplacementsApplyBeforeCF13=TRUE
SubStringReplacementsMatchWholeWordsOnly13=FALSE
SubStringReplacementsFrom14=iv
SubStringReplacementsTo14=IV
SubStringReplacementsCaseSensitive14=FALSE
SubStringReplacementsApplyBeforeCF14=FALSE
SubStringReplacementsMatchWholeWordsOnly14=TRUE
SubStringReplacementsFrom15=ix
SubStringReplacementsTo15=IX
SubStringReplacementsCaseSensitive15=FALSE
SubStringReplacementsApplyBeforeCF15=FALSE
SubStringReplacementsMatchWholeWordsOnly15=TRUE
SubStringReplacementsFrom16=v
SubStringReplacementsTo16=V
SubStringReplacementsCaseSensitive16=FALSE
SubStringReplacementsApplyBeforeCF16=FALSE
SubStringReplacementsMatchWholeWordsOnly16=TRUE
SubStringReplacementsFrom17=various artists
SubStringReplacementsTo17=
SubStringReplacementsCaseSensitive17=FALSE
SubStringReplacementsApplyBeforeCF17=TRUE
SubStringReplacementsMatchWholeWordsOnly17=TRUE
SubStringReplacementsFrom18=vi
SubStringReplacementsTo18=VI
SubStringReplacementsCaseSensitive18=FALSE
SubStringReplacementsApplyBeforeCF18=FALSE
SubStringReplacementsMatchWholeWordsOnly18=TRUE
SubStringReplacementsFrom19=vii
SubStringReplacementsTo19=VII
SubStringReplacementsCaseSensitive19=FALSE
SubStringReplacementsApplyBeforeCF19=FALSE
SubStringReplacementsMatchWholeWordsOnly19=TRUE
SubStringReplacementsFrom20=viii
SubStringReplacementsTo20=VIII
SubStringReplacementsCaseSensitive20=FALSE
SubStringReplacementsApplyBeforeCF20=FALSE
SubStringReplacementsMatchWholeWordsOnly20=TRUE
SubStringReplacementsFrom21=vs
SubStringReplacementsTo21=vs.
SubStringReplacementsCaseSensitive21=FALSE
SubStringReplacementsApplyBeforeCF21=FALSE
SubStringReplacementsMatchWholeWordsOnly21=TRUE


Also, Magnus, I found a critical bug in the macro recorder -- if you include a double-quote character in a macro description, it somehow manages to include it in the macro filename! I'm not sure how it does that, but it's an illegal character, and you'll see from my substring replacement profile I replace double quotes ["] with 2 consecutive single quotes ['']. It almost looks the same, but it's a legitimate character string for Windows filenames.

Edited by Llamatron on April 25 2005,10:28
Back to top
Profile PM 
Magnus Brading
Almighty Author



Group: Super Administrators
Posts: 2751
Joined: Aug. 2002
Posted: April 25 2005,11:00

Thanks for your macros, Llamatron.

I cannot reproduce the problem you mention though. All illegal characters in macro names are replaced by dashes. If I e.g. create a macro named:

test"test

it is automatically named:

test-test

Please give detailed instructions about how to recreate the problem you mention if you still think it exists. It sounds very strange indeed, since the filesystem should never allow such a filename to be created even if a program asks it to...

--------------
Software author and website owner
Back to top
Profile PM WEB 
Llamatron
Board Veteran



Group: Members
Posts: 67
Joined: Sep. 2004
Posted: April 25 2005,19:10

Sheesh -- this is crazy. :shocked: Maybe it was 2 single quotes and I just typed it automatically without thinking. I can't duplicate the behavior now. (You're right, the filesystem shouldn't permit it even if a program asks for it.)

Sorry! :p  I'm pretty careful and I remember even comparing the characters to be sure they were different, but who knows. Isn't life with computers fun?  :D

Edited by Llamatron on April 25 2005,19:12
Back to top
Profile PM 
DasKraut
Board Newbie



Group: Members
Posts: 7
Joined: July 2004
Posted: Oct. 05 2008,05:58

This may be a dumb question, but how do I go about entering the macro shown above for removing "The" from artist names?  I copied the code, put it in a text file and saved it with the extension .mtm in a subdirectory of the install directory named "Macros" just as shown in the help file but when I look for the macro when the program is open I don't see it in the menu.

Edited by DasKraut on Oct. 05 2008,17:40
Back to top
Profile PM 
nikkil
Board Buff



Group: Members
Posts: 57
Joined: Mar. 2012
Posted: Dec. 31 2012,16:48

Hi DasKraut, I don't think that this will be possible since macros are anly used for automated tasks.
Back to top
Profile PM 
12 replies since Mar. 24 2005,16:18 < Next Oldest | Next Newest >

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