Determine the last loop inside loop?

QUOTE (LosMintos @ Sep 23 2008, 10:26) <{POST_SNAPBACK}>
... I'm trying to execute a command only in the last loop, e.g.
$loop(%_filename_ext%) 
  $num(%track%,2) -- %title%
  IF this is the very last run of this loop, than do ... else nothing.
$loopend

... (By the way, it was easy to determine the first loop: $if($eql(%_counter%,1),true,false).
Any help is appreciated. Regards, LosMintos


Better late than never ... here is an example export script ... $filename($getEnv('USERPROFILE')'\Desktop\Export.Whatever.txt',UTF-8) $loop(%_path%)$puts(CountMax,%_counter%)$loopend() $loop(%_path%) 'Item: '%_counter%$if($eql($get(CountMax),%_counter%),' <-- Here is the last item.',) 'Path: '%_path% $loopend()

Example output ...

Item: 1
Path: T:\TEST\File 01.mp3

Item: 2
Path: T:\TEST\File 02.mp3

Item: 3 <-- Here is the last item.
Path: T:\TEST\File 03.mp3

DD.20140301.1847.CET