Page 2 of 2

Re: Question about some more folders in orga-script

Posted: Tue Feb 27, 2018 4:55 pm
by jtclipper
Got the files will check them out preferably this weekend

Re: Question about some more folders in orga-script

Posted: Tue Feb 27, 2018 4:59 pm
by dad-of-gismo
Thank you very much ! :-)

Re: Question about some more folders in orga-script

Posted: Sun Mar 04, 2018 12:18 pm
by jtclipper
The files actually contain those Unicode 'Asian' characters it is not some kind of error

For the restructure part of the question please have a look at the following script :

Code: Select all

{!%*AR,1,1%+%AR%+%AR% - %L%+%C%}

program folder_rules_ex;
const
  _MiscFolder = '0-9 & Misc';
  _MiscValue  = '1234567890.+-_!@#$%^&()''';
  _SamplerFolder = 'S';
  _SamplerValue  = 'Sampler';
begin
  re_Init( false );
  repeat
     //check for misc values
     if Pos( re_getLevel( 1 ), _MiscValue ) > 0 then re_setLevel( 1, _MiscFolder );

     //check comment for Sampler
     if Pos( _SamplerValue, re_getLevel( 4 ) ) > 0 then begin
        re_setLevel( 1, _SamplerFolder ); //set top folder
        re_setLevel( 2, _SamplerValue ); //set child folder
     end;
     //remove comment level , it's just used to check values
     re_removeLevel( 4 );
  until not re_Skip;
end.

Re: Question about some more folders in orga-script

Posted: Sun Mar 04, 2018 3:43 pm
by dad-of-gismo
Thank you !!!
I`ll test it first on a copy.
In a few days, i´ll repost on this !

It´s a pleasure to communicate with you !

Greetings...dad-of-gismo

Re: Question about some more folders in orga-script

Posted: Sat Mar 24, 2018 11:59 am
by dad-of-gismo
Hi,

first, after testing with a few other variables, this solution works great for me !!!
Thanks a lot !!!

Just another short question:
i think in the past, it was possible, to change in the artist Name the first "The".
for example, "The Sweet". I want to save these files as "Sweet, The". Is this possible ?

Greetings from coldy Munich...dad-o-fgismo

Re: Question about some more folders in orga-script

Posted: Sat Mar 24, 2018 2:53 pm
by jtclipper
Yes, it can be done.
First you will need to create a user script variable (File/Options/variables %..%/user (page) - Scripts (panel) at the bottom.
Like so:

Code: Select all

begin
  if Uppercase( Copy( gTag.Artist, 1, 3 ) ) = 'THE'  then begin
     var_result( Trim( Copy( gTag.Artist, 4, 999 ) ) + ',The' );
  end else begin
     var_result( gTag.Artist );
  end;
end.
Then you simply replace the %AR% with the new variable, I named it ART.scv so the script becomes :

Code: Select all

{!%*@ART.scv,1,1%+%@ART.scv%+%@ART.scv% - %L%+%C%}

program folder_rules_ex;
const
  _MiscFolder = '0-9 & Misc';
  _MiscValue  = '1234567890.+-_!@#$%^&()''';
  _SamplerFolder = 'S';
  _SamplerValue  = 'Sampler';
begin
  re_Init( false );
  repeat
     //check for misc values
     if Pos( re_getLevel( 1 ), _MiscValue ) > 0 then re_setLevel( 1, _MiscFolder );

     //check comment for Sampler
     if Pos( _SamplerValue, re_getLevel( 4 ) ) > 0 then begin
        re_setLevel( 1, _SamplerFolder ); //set top folder
        re_setLevel( 2, _SamplerValue ); //set child folder
     end;
     //remove comment level , it just used to check values
     re_removeLevel( 4 );
  until not re_Skip;
end.

Re: Question about some more folders in orga-script

Posted: Mon Mar 26, 2018 3:48 pm
by dad-of-gismo
Thank you very much ... i´ll try !