Hi,
is it possible to recplace items in a specific data field by script?
My problem: in several data fields, e.g. genre, I used "," as separator. Several music managing programs (e.g. Helium, Musicbee) use ";" as separator. What to do to replace "," with ";" in these data fields?
request: script to replace items
Re: request: script to replace items
You could use a replacement matrix for that but here is a simple script that would do that.
Moreover you can now easily modify the online amg script to use ; as a separator, At line 11
you can change comma to a semicolon there
Code: Select all
program replace_sep;
begin
if not tg_Init then exit; // no rows get out
repeat
tg_setField( 'Genre', AnsiReplaceText( tg_getField( 'Genre' ), ',', ';' ) );
tg_setField( 'Tones', AnsiReplaceText( tg_getField( 'Tones' ), ',', ';' ) );
tg_setField( 'Styles', AnsiReplaceText( tg_getField( 'Styles' ), ',', ';' ) );
tg_setField( 'Mood', AnsiReplaceText( tg_getField( 'Mood' ), ',', ';' ) );
tg_setField( 'Situation', AnsiReplaceText( tg_getField( 'Situation' ), ',', ';' ) );
until not tg_Skip;
end.
Code: Select all
const LIST_SEP = ',';
Re: request: script to replace items
Thank you jtclipper,
this is amazing and will help me lot.
this is amazing and will help me lot.