IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Export to txt, problem with $if statement
tokkusu
post Jul 9 2017, 21:01
Post #1


Member


Group: Members
Posts: 3
Joined: 9-July 17
Member No.: 23622
Mp3tag Version: 2.83



Hello!
Here is my export script to txt (in attachment)
Attached Image

The problem is that I can't rid of «magic number» 4 in $if section.
CODE

$ifgreater($folderdepth(%_folderpath%),4,%_parent_directory%,%_directory%))


It's not cross-functional. I think I need another $if there, but can't figure out what $if.
Hope I described the problem clearly.
Go to the top of the page
 
+Quote Post
tokkusu
post Jul 10 2017, 08:25
Post #2


Member


Group: Members
Posts: 3
Joined: 9-July 17
Member No.: 23622
Mp3tag Version: 2.83



Tried to replace 4 with %_directory% and it worked. But I'm doubt about this solution.

Oh, and another problem is:
I have empty strings between strings. huh.gif

This post has been edited by tokkusu: Jul 10 2017, 08:28
Go to the top of the page
 
+Quote Post
DetlevD
post Jul 10 2017, 10:07
Post #3


Member


Group: Full Members
Posts: 6639
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.84b



QUOTE (tokkusu @ Jul 9 2017, 22:01) *
... $ifgreater($folderdepth(%_folderpath%),4,%_parent_directory%,%_directory%)) ...

The first step in understanding the situation should be to check the syntax regarding pairs of round clambs.

The second step should be to check the part of the script where the $loop function has been used as an argument within the $ifgreater function. Does this really work?

DD.20170710.1200.CEST

This post has been edited by DetlevD: Jul 10 2017, 11:00


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
tokkusu
post Jul 10 2017, 10:18
Post #4


Member


Group: Members
Posts: 3
Joined: 9-July 17
Member No.: 23622
Mp3tag Version: 2.83



QUOTE (DetlevD @ Jul 10 2017, 12:07) *
The first step in understanding the situation should be to check the syntax of the formatstring:
$ifgreater($folderdepth(%_folderpath%),4,%_parent_directory%,%_directory%)

DD.20170710.1107.CEST


My music collection looks like this:
disk->style->artist->album[->CD#]
Usually 4 folders.
The idea is: if path has more than 4 folders -> check this with this $if operator.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th September 2017 - 06:08