Siren Help


[Table of Contents & Credits--start]
Note: This section and any headers enclosed in square brackets not part of original file.

"Siren is a file renaming program" that can be found at http://scarabee-software.net/en/siren.html.

All the following content credit goes to Siren's author. FAQ and more help at https://rentry.co/siren_faq.

[Table of Contents & Credits--end]


[Introduction]

Did you look at the "First Contact" option?

Ok, let's go further.

The main window is divided into two parts. The top one contains the file list, the bottom one is used to display the image associated to the active file.

The aim of Siren is to rename files.

Its guiding principle is the use of expressions.

An expression can contain text and information specific to each treated file.

Each of these information is used through a "variable".

A variable must be prefixed by a '%'.

They can be assembled into different groups.

Don't be frightened by the quantity. Tools like the completion window or the right click on a value will enable you to avoid having to remember them all.

[Variables]

Here is a list:
(All dates are in format "YYYYMMDD" and times in format "HHMMSS" [HH=24 hours])

  • Group of "base" information: all files
%f   : the full name (without the path)
%b   : the "base" name
       (ie for "autoexec.bat" it is "autoexec")
%e   : the name extension
       (ie for "autoexec.bat" it is "bat")
%s   : the size in the most appropriate unit
%sb  : the size in bytes
%sk  : the size in kilo bytes
%sm  : the size in mega bytes
%sg  : the size in giga bytes
%F   : the DOS name (without the path)
%B   : the base of the DOS name
%E   : the extension of the DOS name
%a   : the attributes
%y   : the type
%d   : the modification date and time (default value)
%dd  : the modification date
%dt  : the modification time
%dm  : the modification date and time
%dmd : the modification date
%dmt : the modification time
%dc  : the creation date and time
%dcd : the creation date
%dct : the creation time
%da  : the last access date and time
%dad : the last access date
%dat : the last access time
%t   : the modification time (default value)
%tc  : the creation time
%ta  : the last access time
%tm  : the modification time

%N   : a number contained in the base file name
       it can be followed by a digit indicating its position
       (1 is the default value)
       for example, for Fic2_15zzz784.txt:
          %N  will give   2
          %N1 will give   2
          %N2 will give  15
          %N3 will give 784
          %N4 will give "" (empty string)

%n   : the selection number
%np  : the selection number relative to the file path
       for example:
       File               %n        %np
       \Dir1\Img1.jpg     001       001
       \Dir1\Img2.jpg     002       002
       \Dir2\Img3.jpg     003       001
       \Dir2\Img4.jpg     004       002

Zeroes ('0') will be eventually added on the left of these numbers to reach the size defined in "Options/_Numbers_".

1
2
3
4
5
6
7
8
9
%p   : the parent directory
%p2  : the grand parent directory
%pn  : the nth level parent directory
%P   : the full path to the file

%D   : the current date and time
%Dd  : the current date
%Dt  : the current time
%T   : the current time
  • Group of "audio" information: mp2, mp3, mpc, ogg, wma, wav
    (%m, %M and %A variable prefixes are equivalent)
1
2
3
4
5
%Ab  : the bitrate
%As  : the sampling rate
%AM  : the mode (mono/stereo)
%Ad  : the duration
%Ai  : some information
  • Group of "id3v1 tag" information: mp2, mp3, mpc
1
2
3
4
5
6
7
%mt  : the title
%ma  : the artist
%mA  : the album
%my  : the year
%mc  : the comment
%mT  : the track number
%mg  : the genre
  • Group of "audio tag" information: mp2, mp3, mpc, ogg, wma, wav
    (%M and %A variable prefixes are equivalent)
%At  : the title
%Aa  : the artist
%AA  : the album
%Ay  : the year
%Ac  : the comment
%AT  : the track number
%An  : the number of tracks
%Ak  : the track (text)
%Ag  : the genre
%Ap  : the composer
%Ao  : the original artist
%AC  : the copyright
%Au  : the URL
%Ae  : encoded by
%AIf : the format of an attached image
  • Group of "video" information: avi, mpg, mpeg, asf, wmv
1
2
3
4
5
6
7
%Vx  : the width
%Vy  : the height
%Vs  : the sampling rate
%VM  : the mode (mono/stereo)
%Vd  : the duration
%Vf  : the number of frames per second
%Vi  : some information
  • Group of "video tag" information: avi, asf, wmv
%Vt  : the title
%VU  : the subject
%Va  : the artist
%Vc  : the comment
%Vk  : the keywords
%VE  : the engineer
%VT  : the technician
%Vg  : the genre
%Vn  : the creation date
%VO  : the source
%VC  : the copyright
%VS  : the software used to create the file
%VIf : the format of an attached image
  • Group of "image" information: tif, tiff, jpg, jpeg, gif, png, pcx, bmp, dib, ico, cur
1
2
3
4
%Ix  : the width
%Iy  : the height
%Ib  : the number of bits per pixel
%Ii  : some information
  • Group of "exif" information: jpeg, jpg
    Note: "official" name of the tag preferred.
%Xde : ImageDescription
%Xmk : Make
%Xmo : Model
%Xor : Orientation
%Xxr : XResolution
%Xyr : YResolution
%Xru : ResolutionUnit
%Xso : Software
%Xar : Artist
%Xdt : DateTime
%Xdtd: DateTime "date part"
%Xdtt: DateTime "time part"
%Xwp : WhitePoint
%Xpc : PrimaryChromaticities
%Xyc : YCbCrCoefficients
%Xyp : YCbCrPositioning
%Xbw : ReferenceBlackWhite
%Xco : Copyright
%Xeo : ExifOffset
%Xgo : GPSOffset
%Xet : ExposureTime
%Xfn : FNumber
%Xep : ExposureProgram
%Xsy : SpectralSensitivity
%Xsr : ISOSpeedRatings
%Xve : ExifVersion
%Xdo : DateTimeOriginal
%Xdod: DateTimeOriginal "date part"
%Xdot: DateTimeOriginal "time part"
%Xdd : DateTimeDigitized
%Xddd: DateTimeDigitized "date part"
%Xddt: DateTimeDigitized "time part"
%Xcc : ComponentConfiguration
%Xbp : CompressedBitsPerPixel
%Xss : ShutterSpeedValue
%Xav : ApertureValue
%Xbv : BrightnessValue
%Xev : ExposureBiasValue
%Xma : MaxApertureValue
%Xsd : SubjectDistance
%Xmm : MeteringMode
%Xls : LightSource
%Xfa : Flash
%Xfl : FocalLength
%Xfe : FlashEnergy
%Xuc : UserComment
%Xfv : FlashPixVersion
%Xcs : ColorSpace
%Xiw : ExifImageWidth
%Xih : ExifImageHeight
%Xsf : RelatedSoundFile
%Xfx : FocalPlaneXResolution
%Xfy : FocalPlaneYResolution
%Xfu : FocalPlaneResolutionUnit
%Xei : ExposureIndex
%Xsm : SensingMethod
%Xfs : FileSource
%Xst : SceneType
%Xcr : CustomRendered
%Xem : ExposureMode
%Xwb : WhiteBalance
%Xdz : DigitalZoomRatio
%XfL : FocalLengthIn35mmFilm
%Xsc : SceneCaptureType
%Xgc : GainControl
%Xct : Contrast
%Xsu : Saturation
%Xsh : Sharpness
%XsD : SubjectDistanceRange
%Xgv : GPSVersionID
%XlA : GPSLatitudeRef
%Xla : GPSLatitude
%XlO : GPSLongitudeRef
%Xlo : GPSLongitude
%XaL : GPSAltitudeRef
%Xal : GPSAltitude
%Xts : GPSTimeStamp
%Xsa : GPSSatellites
%Xus : GPSStatus
%XmM : GPSMeasureMode
%Xdp : GPSDOP
%XsP : GPSSpeedRef
%Xsp : GPSSpeed
%XtR : GPSTrackRef
%Xtr : GPSTrack
%XiD : GPSImgDirectionRef
%Xid : GPSImgDirection
%Xmd : GPSMapDatum
%XLA : GPSDestLatitudeRef
%XLa : GPSDestLatitude
%XLO : GPSDestLongitudeRef
%XLo : GPSDestLongitude
%XbE : GPSDestBearingRef
%Xbe : GPSDestBearing
%XDR : GPSDestDistanceRef
%XDr : GPSDestDistance
  • Group of "karaoke" information: kar, mid
1
2
3
4
5
6
7
%Ky  : the type
%Kv  : the version
%Ki  : an information
%Kl  : the language
%Kt  : the title
%Ka  : the author
%KC  : the copyright
  • Group of "office & pdf" information: doc, xls, pot, pps, ppt, mpp, dot, pdf
%Ot  : the title
%Os  : the subject
%Oa  : the author
%Ok  : the keywords
%Oc  : the comments
%OT  : the template
%OA  : the last author
%Or  : the revision number
%Oe  : the edit time (in minutes)
%Op  : the last print date
%Opd : the last print date "date part"
%Opt : the last print date "time part"
%On  : the creation date
%Ond : the creation date "date part"
%Ont : the creation date "time part"
%Ob  : the last save date
%Obd : the last save date "date part"
%Obt : the last save date "time part"
%OP  : the page count
%OW  : the word count
%OC  : the char count
%ON  : the application
%OS  : the security level
[Modifiers]

You can put one or more character modifiers just after the "%":

1
2
3
4
5
6
7
u : all characters upper case
l : all characters lower case
U : first character of each word upper case, the others
    lower case. The words are separated by the characters
    specified in "Options/Modifications"
L : first character uppercase, the rest lowercase
@ : accented characters to standard ASCII

("é" to "e", "ü" to "u", "Á" to "A" ...)

For example, for the file "Ébölie family photo.JPG":

Expression Result
%uf ÉBÖLIE FAMILY PHOTO.JPG
%lf ébölie family photo.jpg
%Uf Ébölie Family Photo.jpg
%Lf Ébölie family photo.jpg
%@f Ebolie family photo.JPG
%@uf EBOLIE FAMILY PHOTO.JPG
%@Lf Ebolie family photo.jpg

Of course, the character "*" can be used.

Depending upon the position of the '.' (the dot which delineates file base name from extension) in an expression, the "*" will represent either the base name or the extension. It is not a variable and its value can not be modified.

[Working examples]

Here are some examples based on the file "autoexec.bat" modified the 01/01/2002 at 14:10:01

Expression Result
%b autoexec
File_%f File_autoexec.bat
%b_%dmd.%e autoexec_20020101.bat
%ub_%t.%e AUTOEXEC_141001.bat
base %b - extension %e base autoexec - extension bat
base %Ub - extension %Ue base Autoexec - extension Bat

Every variable can be postfixed by a "[]" modifier. It will be split into an array of substrings following the specified separator characters.

The usage is: "[ i , "sep" ]"

1
2
3
4
5
6
7
i   : number of the substring to extract
      If negative, the extraction is done from the end
      If "0" (zero), it's equivalent to the complete string
      without the begining and ending spaces
sep : list of separator characters, optional.
      If not specified, the list defined in
      "Options/Modifications" is used

If the chosen string is "%b", "%b[n]" contains the file base name characters between the n-1 and nth separator occurrences. Beginning and ending spaces are deleted (full trim).

For example, using the file:

"01 - Artist_Group - Song title .mp3"

with "-" in the array elements separators list in "Options/_Modifications_":

Expression Result
%b[3].%e Song title.mp3
%ub[3] - %b[2].%e SONG TITLE - Artist_Group.mp3
%b[1].%e 01.mp3
%b[-3].%e 01.mp3
%b[-1].%e Song title.mp3
%b[0] 01 - Artist_Group - Song title
%b[2,"_"] Group - Song title
%b[2][2,"_"] Group

Every variable can be postfixed by a "()" modifier. This modifier can have two functions:

  • Substring extraction
    The usage is very near of the standard "substr": "( pos, nb )"
1
2
3
4
5
6
pos  : starting position
       If negative, it is relative to the end of the string
nb   : number of characters
       If not present, the extraction is done until the end
       If negative, the number of characters to extract is
       computed from the end of the string
  • String replacement
    The usage is near of the standard "replace": "( "str1", "str2", i1, i2, cs )"
1
2
3
4
5
6
7
8
9
str1 : String to replace
str2 : Replacement string
       If not present the string to replace is deleted
i1   : Starting occurrence
       If negative, it is relative to the end of the string
i2   : Number of replacements to do
       If negative, all remaining occurences are treated
cs   : Number indicating if the search is case sensitive:
       0 for no, any other value for yes

The last four parameters are optional. By default all occurrences are treated and the search is case insensitive.

You can "concat" as many modifiers "()" and "[]" as you want. They will be evaluated from left to right.

The character modifiers (u,l,@...) will be applied on the result so obtained.

Here are some examples using the file "autoexec.bat" with "-" in the array elements separators list:

Expression Result
%b(1,4).%e auto.bat
%ub(5,2).%e(1,1) EX.b
%b(5)_%dmd(3).%Ue exec_020101.Bat
%b(-4,3).bat exe.bat
%b(1,-4).bat auto.bat
%b(-4,-2).bat ex.bat
%b("auto","automatic").%e automaticexec.bat
%b("exe").%e autoc.bat
%b("e","#",2,1).* autoex#c.bat
%b("e","#",-1).* autoex#c.bat
%b("e","#",1,1).* auto#xec.bat
%b("e","#",-2,1).* auto#xec.bat
%b("E","#",1,-1).* auto#x#c.bat
%b("E","#",1,-1,0).* auto#x#c.bat
%b("E","#",1,-1,1).* autoexec.bat
%b("auto","auto_")(1,8).%e auto_exe.bat
%f("exec","x")("auto","oto") otox.bat
%Lb("auto","auto-")[2](3).%e Ec.bat

Let's examine, step by step, that last example:

%Lb("auto","auto-")[2](3).%e on "autoexec.bat":

[Step] Operator Result
[1] %b on "autoexec.bat" gives "autoexec"
[2] ("auto","auto-") on "autoexec" gives "auto-exec"
[3] [2] on "auto-exec" gives "exec"
[4] (3) on "exec" gives "ec"
[5] the modifier L on "ec" gives "Ec"
[6] add fixed text "." on "Ec" gives "Ec."
[7] add %e (extension) on "Ec." gives "Ec.bat"

Like under DOS, the expression "*." will rename "autoexec.bat" to "autoexec".

If you want to use one of the special characters (%*()[]...) as a standard character, put a '\' in front of it.

Options have been added to modify the string previously composed ("File" menu, under "Options/_Modifications_").

Two lists of characters to delete can be specified:

  • The first contains the characters to delete.
    For example, the file "image.bmp" with "aei" in the list
    will be proposed "mg.bmp"
  • The second one, the for which no repetition is allowed.
    For example, the file "a---b.txt" with "-" in the list
    will be proposed "a-b.txt".

Two replacement character lists are present.

The first ("From") indicates which characters to replace and the second ("To") indicates by what to replace them.
For example, the file "image_rua.bmp" with "_r" and "-s" in the lists "From" and "To" will be proposed "image-sua.bmp"

There is a box to specify by what to replace invalid filename characters (*\? ...etc...).
If you let it empty, they will be deleted.

You can enter a maximum name length, 64 characters for example.
If possible, only the base name will be truncated.

For audio files, you can choose to use the value from one tag or another if the needed one is empty.
Only common id3v1 and audio tag values are concerned (title, artist, album, year, comment, track number and genre).
Choose too if a variable will be empty or not if it's associated data is not valid. This concerns only dates.

For Exif, you've surely noticed that many information contain a "/" (division symbol). But this character is not allowed in file names and will be replaced. You can specify which string to use as separator.

For example " divided by ".

[Further help]

Siren will help you writing renaming expression:

If, in the file list, you right click on an information that interests you, you'll be able to insert it's corresponding variable or current value in the expression.

During the writing of an expression:

  • Enter: recomputes the "Future names" and adds the expression to the combo list.
  • Ctrl+Space, F1 or right-click: displays the completion window.
    Double click on an element to add it in the current expression.
  • Ctrl+I: pastes the current file name.
  • Ctrl+P: displays the current cursor column in the status bar.

The loading of a directory can include all its sub-directories allowing the renaming off all files in a directory tree. In this mode, directories cannot be renamed.

In the "Filter" combo, you can enter a string to limit the file list (for example: "*.mp3").
A filter can be compound of many "file specs", separated by ';'.
For example, to list only "mp3", "bmp" or files beginning with a 'F', type: *.mp3;*.bmp;F*
The "DOS" filter functionalities have been extended to the UNIX "standard" ones.
The meta characters list limited to "*" and "?" has been completed with "[!-]".
It is possible to specify allowed or refused file lists.

For example, the files:

"mp3" files containing a "#" or a "=" : *[#=]*.mp3
beginning with an alpha character: [A-Z]*
not beginning with "T": [!T]*

... etc ...

During a renaming, if a "system error" occurs, the file (or files) concerned will be colored "near red" and the associated message will be displayed in the status bar.

Files drops are allowed: select files in another program (Windows Explorer for example) and move them onto Siren. The parent directory is loaded and files selected. A directory drop can be done directly on the "directory" combo.

To activate the shell contextual menu for the current directory, right click on the directory combo or on "..".

You can personalize the list and the order of the displayed columns. Each one will be visible only if it is checked in "Options/_Columns_" and if the toolbar button associated to his Group is checked too.

You can let Siren automatically select groups of used columns and eventually display only non empty columns.

The "Favorites" menu will enable to keep and reuse your preferred rename expressions.

By using the program you will see that there are many different ways of getting the same results simply.

In case of mistake, don't worry, until you change of directory or you quit Siren, all renaming can be undone.

The rest of the program:

  • choosing the directory
  • choosing and ordering the columns
  • search/select with a file filter
  • sort
  • selection number
  • number formats
  • selections
  • directory monitoring
  • create DOS batch file of rename commands
  • open, delete
  • image visualization
  • splitter usage
  • system shortcuts to Siren
  • copy selected files list to the clipboard

... etc ...

shouldn't be too difficult.

Do not hesitate to share your remarks and suggestions with me.

PS: Sorry for my poor frenglish.

Edit
Pub: 01 May 2020 21:30 UTC
Edit: 06 May 2020 09:12 UTC
Views: 1155