Export to txt, problem with $if statement


#1

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



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

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



#2

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:


#3

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


#4

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.