View Single Post
Old 31st October 2018, 20:32   #14
Wineroz
Member
 
Join Date: Oct 2018
Posts: 63
Quote:
Originally Posted by ryerman View Post
Maybe this does what you want
[...]
First- I am sorry for taking so long. That was just rude, as it seemed I had ditched that topic after you having spent time on that code


Second, I will try to past that code in here, your original and mine with some minor adjustments applied to it:
code:

$puts(CorrectDrive,$IfStrEqual2($left(%filename%,1),W,YES,NO))
$puts(NumberOfParts,$add($sub($len(%filename%),
$len($replace(%filename%,\,))),1))
$puts(SecondPart,$PathLTrim($PathLPart(%filename%,2),1))
$IfStrEqual2($get(CorrectDrive),YES,
$IfStrEqual2($ifgreater($get(NumberOfParts),2,YES,NO),NO,SOME_INDICATOR,
$IfStrEqual2($IfStrEqual2($get(SecondPart),W,YES,NO),YES,MY_OWN_INDICATOR,BLANK)),BLANK) ### %filename% ###


code:
$puts(CorrectDrive,$IfStrEqual2($left(%FILENAME%,1),M,YES,NO))
$puts(NumberOfParts,$add($sub($len(%FILENAME%),
$len($replace(%FILENAME%,\,))),1))
$puts(SecondPart,$PathLTrim($PathLPart(%FILENAME%,2),1))
$IfStrEqual2($get(CorrectDrive),YES,
$IfStrEqual2($IfGreater($get(NumberOfParts),2,YES,NO),NO,▼,
$IfStrEqual2($IfStrEqual2($get(SecondPart),M,YES,NO),YES,▼,)),)


[In both versions all of the above should of course be written in one long line, with every part / sub-line touching the next one]


As you can see:

1] I replaced >>W<< with >>M<<, which is suppose to mean the letter of the drive

2] I capitalized %filename% [not really important, I did that just for better readability]

3] I chosen
code:


as a clear indication for the negative case [indication]

4] I removed the positive indication completely, as to not waste space on the Playlist and Songticker for showing me some marker when I do not need it to see it [as for me it is the normal state than I expect to see for 99.99% of the time]


And it works. I can stick literally right next to it my previous ATF code and see that triangle whenever a file is residing in... folder M of drive M. Was that your intention? It was mine as that is exactly what I was after, as I keep in folder M or its sub-folders files that are most likely to be deleted or somehow worked on- but to which files I still listen too altogether with all of the other normal files. And so my triangle tells me that such file is to be deleted or taken care of in some other way

But if your >>W<< meant drive and my >>M<< means folder - how is that possible? All my files are on drive >>M<< but those which are to be marked with my triangle indicator are residing only in folder >>M<<. And that second code does this
Wineroz is offline   Reply With Quote