Question about some more folders in orga-script

Use this forum for everything concerning script usage
User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Question about some more folders in orga-script

Post by jtclipper »

Got the files will check them out preferably this weekend

dad-of-gismo
Newbie
Newbie
Posts: 19
Joined: Fri Jun 17, 2016 4:15 pm

Re: Question about some more folders in orga-script

Post by dad-of-gismo »

Thank you very much ! :-)

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Question about some more folders in orga-script

Post 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.

dad-of-gismo
Newbie
Newbie
Posts: 19
Joined: Fri Jun 17, 2016 4:15 pm

Re: Question about some more folders in orga-script

Post 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

dad-of-gismo
Newbie
Newbie
Posts: 19
Joined: Fri Jun 17, 2016 4:15 pm

Re: Question about some more folders in orga-script

Post 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

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Question about some more folders in orga-script

Post 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.

dad-of-gismo
Newbie
Newbie
Posts: 19
Joined: Fri Jun 17, 2016 4:15 pm

Re: Question about some more folders in orga-script

Post by dad-of-gismo »

Thank you very much ... i´ll try !

Post Reply