Skip to main content
Topic: $trim() not working in File Operations Setup Window (removing " ?") (Read 119 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

$trim() not working in File Operations Setup Window (removing " ?")

Hi,
f2k 1.5b18,

while trying to rename a file with this pattern
Code: [Select]
$puts(F,[%discnumber%][%tracknumber%. ][%artist% - ]%title%[' ('%comment%')']) $trim($cut($get(F),140))
the $trim() does not remove the last space from the resulting filename.

Before renaming: 105. Michel Sardou - Restera-t-Il Encore.mp3
After   renaming: 105. Michel Sardou - Restera-t-Il Encore .mp3  < space before extension

I tried a double $trim($trim($cut... or and extra $trim( around the $get, but that all did not removed the last space, which, IMHO, should be trimmed, because the Title Formatting Syntax Reference says " $trim(A) =>Trims leading/trailing space characters from A."

Please see the screenshots.

Why is the $trim not working here?

 

Re: $trim() not working in File Operations Setup Window (removing " ?")

Reply #1
Thanks for the report.

The question mark gets stripped by the File Operations component after evaluation of the title formatting, so the $trim() cannot remove the space because at this point the question mark is still there.

 
SimplePortal 1.0.0 RC1 © 2008-2019