Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: File Operations - Sorting problem (Read 1907 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

File Operations - Sorting problem

Hi there, i want to sort my music that if i have an artist which starts with any number or any sign like an asterisk (*) or something like that that, they will be moved into the folder "#" and the others in the corresponding folders (i got that already with ($left(%Artist%,1), but i don't know how to do this with numbers and signs).

Thank you in advance


File Operations - Sorting problem

Reply #1
You can create playlist with all your library items then sort by artist - on top it will list the ones you seem to be interested in.

Alternatively, for artists starting with numbers you could try this:

  $greater($left(%artist%,1),0)

it will return true if first character is number, and false if char.

and for special chars, maybe this:

  $strchr($left(%artist%,1),'~!@#$%^&*-=')

or combined:

  $if($or($greater($left(%artist%,1),0), $strchr($left(%artist%,1),'~!@#$%^&*-=')), Yes, No)

File Operations - Sorting problem

Reply #2
^^^^
This is not a suitable solution for file operations.

Instead try this:
$replace($left(%Artist%,1),*,#,1,#,2,#,3,#,4,#,5,#,6,#,7,#,8,#,9,#)

This will substitute '*' and all numbers with '#'.

File Operations - Sorting problem

Reply #3
This is not a suitable solution for file operations.

Yes/No is only to provide easier comprehension, if it's not obvious.

If you want literal pattern, here it is:

$if($or($greater($left(%artist%,1),0), $strchr($left(%artist%,1),'~!@#$%^&*-=')),#\)%artist%\%album%\%tracknumber%. %title%

And yes it can be done in couple of different ways.

File Operations - Sorting problem

Reply #4
Of course, but using Yes/No and referring to sorted playlists can be more misleading than helpful.

By the way, your pattern doesn't work for artists starting with a letter. This one should do it:

$if($or($greater($left(%artist%,1),0), $strchr($left(%artist%,1),'~!@#$%^&*-=')),#,$left(%artist%,1))\%artist%\%album%\%tracknumber%. %title%

File Operations - Sorting problem

Reply #5
Hey, gimme a break and stop confusing others if not necessary.

Pattern works fine. Try harder.
The one that doesn't work is your correction which makes new folder with starting letter from artist name.

File Operations - Sorting problem

Reply #6
Thank you for your answers! I gotta try them later and reply if they work for me!

best regards

 

File Operations - Sorting problem

Reply #7
Hey, gimme a break and stop confusing others if not necessary.
Maybe, you should better follow your own advice.

Pattern works fine.
No, it doesn't.
Try harder.
Better, you should try reading the first post more carefully.

The one that doesn't work is your correction which makes new folder with starting letter from artist name.
And that is exactly what pinky0815 wants to achieve.