1 (edited by Stefan 2013-03-20 09:36:15)

Topic: How to remove doubled extension?

Q: How to remove doubled extension?

  FROM:
  imagename.JPG.jpg

  TO:
  imagename.jpg
 


 
A: Use a String Modifier like:
 
  Expression: %b(".jpg","").%e

 
  Explanation: We use an "Replacement String modifier" to find and replace something on the "Variable" %b
 
                           Since only the last dot of the file name indicates the extension,
                           the first '.JPG' is only a part of the file name and can be modified as everything.


Variables

  A lot of information is extracted from files or can be computed based on different elements.
  Each of these information can be used in a rename expression through a "variable".   
  For example :
    %b    the "base" name (ie for "autoexec.bat" it is "autoexec")
    %e    the name extension (ie for "autoexec.bat" it is "bat")
 

Modifiers

  For example: change case, delete some characters, switch parts, modify the format of a date ...
  Modifiers are the tools that will achieve this.
  For example String modifier : "( )" 
  Used for "String replacement"
  The usage is near of the standard "replace" : ( "s1", "s2", s, n, c )
      s1    string to replace.
      s2    replacement string. If it is not specified, the string to replace is deleted
       s    starting occurrence. If negative, it is relative to the end of the string
      n    number of replacements to do. If negative, all remaining occurrences are treated
      c    number indicating if the search is case sensitive :
           0 (zero) for no, any other value for yes



See Siren Help (?) for more explanation.

Tested with Siren_312_beta1_build_947_windows_(19.03.2013)