Question about some more folders in orga-script

Use this forum for everything concerning script usage
dad-of-gismo
Newbie
Newbie
Posts: 19
Joined: Fri Jun 17, 2016 4:15 pm

Question about some more folders in orga-script

Post by dad-of-gismo »

Hi from Munich/Gemrany,
first, sorry for my english !!!

I need (after beeing some years away from tagging etc.) some help:
i use the script advanced.scu.
And, i would need some more Levels under the ABCDEF....-Folders.
Example:

* First letter
* Artist Name
* Artist Name - album Name
* Titels (mp3´s).

I don´t match, to change the normal script (perhaps only the first line ???) !
{!%*AR,1,1%+%AR%+%Y% - %L%+%G%}

// the first line contains the folder structure and is dynamically used upon script execution, it is optional

{ sample script to force special folder rules
the folder structure defined is the following :
%*AR,1,1% - artist first letter
%AR% - artist
%Y% - %L% - year album
%G% - dummy genre level, The %G% variable is only used as an example of how to check for other values}
program Advanced_folder_rules;

const
_MiscFolder = '0-9 & Misc'; // mine is '0-9 & Misc'

var
sTmp: string;
begin

// phase 1 loop trough entries and adjust values as needed
re_Init( false );
repeat
sTmp := re_getLevel( 2 );
if UpperCase( Copy( sTmp, 1, 4 ) ) = 'THE ' then begin // remove 'the'
re_setLevel( 1, Copy( sTmp, 5, 1 ) );
re_setLevel( 2, Copy( sTmp, 5, 9999 ) );
end;

if Pos( Copy( sTmp, 1, 1 ), '1234567890.''' ) > 0 then begin // move all those artists to custom folder
re_setLevel( 1, _MiscFolder );
re_setLevel( 2, _MiscFolder );
end;

sTmp := re_getLevel( 4 );
if UpperCase( sTmp ) = 'SOUNDTRACK' then begin // special genre
re_setLevel( 1, _MiscFolder );
re_setLevel( 2, 'Soundtracks' );
end;
re_removeLevel( 4 ); // remove the level, it used only to check genre

sTmp := Trim( re_getLevel( 3 ) );
if sTmp = '-' then begin // missing year AND album tags
re_removeLevel( 3 );
end;
until not re_Skip;

// we have to do the count of files per folder here because the structure may have been altered above
// phase 2 get count and loop trough entries and remove level if we must
re_Init( true );
repeat
if re_getCount = 1 then begin // no year - album structure for just one song
re_removeLevel( 3 ); // if level 3 was removed before it will not do anything
end;
until not re_Skip;

// we have to do the re-count of files per folder here because the structure may have been altered above
// phase 3 get count and loop trough entries and remove level if we must
re_Init( true );
repeat
if re_getCount = 1 then begin // no Artist folder for just one song put it in the root letter folder ( A B C ... )
re_removeLevel( 2 );
end;
until not re_Skip;

end.
I would be very happy about an answer !!!

Greeting from rainy Munich... dad-of-gismo !

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 »

I don't think that you need to use the script at all , just add those lines in the 'sub folder details' grid and uncheck the 'use script'

Code: Select all

%*AR,1,1%
%AR%
%AR% - %L%
If you need some of the functionality of the script let me know and I will adjust it.

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 »

First, thank you very much !!!!!!!!!!!
That´s it !
If i´m allowed to, i will ask a few questions in the future !
I´m re-organising my Collection (about 170.000 Songs, all originals, back to 1978) !

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,

just tested your way, the function is great !
Now i would be happy, if all the folders, where the first letter is not inbetween A-Z, would be moved into a Folder named "0-9 & Misc".
How can i implement this ?

Greetings, dad-of-gismo

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 »

Please download the last beta built, while testing this I found a small bug that prevented to correctly process folders starting with '.'

This a trimmed down version of the advanced script that will take care of Artists not starting with A..Z

Code: Select all

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

program folder_rules_ex;

const
  _MiscFolder = '0-9 & Misc';
  _MiscValue  = '1234567890.+-_!@#$%^&()''';

begin

  re_Init( false );

  repeat
     if Pos( re_getLevel( 1 ), _MiscValue ) > 0 then re_setLevel( 1, _MiscFolder );
  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 »

Hey,
are you still online in this Forum ?
I´m going to get a little depper into my/our script !

Is it possible, in the script above, to intergrate Sampler-Alben, to be sorted in the structure on the Album name ?
Not all the interprets in the A-Z structure with the sampler-Album themselves.

For example:
S --- Sampler --- Bravo Hits, Nr. 44 --- Interpret-Titel

Sampler-Alben are divided (in my DB) with the comment (perhaps not the only comment!) "Sampler" in the comment-field. Comments are divided by ", ".

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 »

If i understand correctly you would like the following:
specific tracks that have the word 'Sampler' in the comment field should be sorted under their own folder and not under the artist name
For example

Code: Select all

S
 |---Sampler
       |----  Album 1      
       |----  Album 2      
       |----  ...
       |----  Album n
If so I would like a couple of files in order to test this

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 »

Yes, that´s it !
How can i give you some files ?
By Attachements ?
Last edited by dad-of-gismo on Sun Feb 25, 2018 12:05 pm, edited 1 time in total.

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 »

... an, by the way, the new Version has some strange behavior in my Songs !
Language: german. Screenshots as attachements.
Edit:
I think, this happens, when the files (buyed in iTunes) have the field "Album-Interpret" filled by "Verschiedene Interpreten" !!!???
Attachments
TGF 13.jpg
TGF 13.jpg (37.3 KiB) Viewed 19598 times
TGF 12.jpg
TGF 12.jpg (38.03 KiB) Viewed 19598 times

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 »

Send me the files via email, I also want a couple of the files with the Unicode Chinese? characters

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 »

Okay, but i can´t find your email-adress in the forum !
PM ?

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 »

Click my nickname and select 'send email'

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 »

i´m sorry...there is no "send email" option in your nickname !
Only pm, in the window, that apears !

Or am i totally wrong ???

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 »

Use this jtclipper@jtclipper.eu will have a look sometime this week

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 »

Hey,
i will send in a few minutes !
Thanks for all !!!!!!!!!!

Post Reply