## 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".

Based on their origin, they have been assembled into different groups :

- Base
- Audio
- Id3v1 tag
- Audio tag
- Video
- Video tag
- Image
- Exif
- Iptc
- Document

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

Some variables are clickable links. They point to the specific modifier associated to them.

#### Group of "base" information

Available for all files whatever their type is.
For the systems other than Windows, "DOS" variables are the same as their "non DOS" equivalent.

`%f` | the name without the path
`%fa` | the file name with the absolute path
`%fc` | the file name as displayed (or computed)
`%fd` | the DOS name without the path
`%b` | the "base" name (ie for "autoexec.bat" it is "autoexec")
`%bd` | the base of the DOS name
`%e` | the name extension (ie for "autoexec.bat" it is "bat")
`%ed` | the extension of the DOS name
`%s` | the file size in the most appropriate unit
`%sb` | the file size in bytes
`%sk` | the file size in kibibytes
`%sm` | the file size in mebibytes
`%sg` | the file size in gibibytes
`%a` | some attributes
`%y` | the type
`%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
`%cm` | MD5 checksum
`%cs` | SHA1 checksum
`%cc` | CRC32 checksum
`%N` | a number contained in the base file name. A digit can indicate its position (1 by default). For example, for `"Fic2_15zzz784.txt"` :
`%N` |  | gives |  | `2`
`%N1` |  | gives |  | `2`
`%N2` |  | gives |  | `15`
`%N3` |  | gives |  | `784`
`%N4` |  | gives |  | "" (empty string)
`%NN` | the "opposite" of `%N` : a non numeric string contained in the base file name. A digit can indicate its position (1 by default). For example, for `"Fic2_15zzz784.txt"` :
`%NN` |  | gives |  | `Fic`
`%NN1` |  | gives |  | `Fic`
`%NN2` |  | gives |  | `_`
`%NN3` |  | gives |  | `zzz`
`%NN4` |  | gives |  | `"" (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
`
`%nc` | the selection number relative to a name "collision" (same beginnings), the expression part following `"%nc"` is not taken into account. For example, with the expression : `%dmd_%nc.%e` `
File |  | Modification date |  | Result
Image1.jpg |  | 01/01/2004 |  | 20040101_001.jpg
Image2.jpg |  | 12/12/2004 |  | 20041212_001.jpg
Image3.jpg |  | 01/01/2004 |  | 20040101_002.jpg
Image4.jpg |  | 12/12/2004 |  | 20041212_002.jpg
Image5.jpg |  | 12/12/2004 |  | 20041212_003.jpg
Image6.gif |  | 12/12/2004 |  | 20041212_004.gif
`
`%ncs` | same principle as `"%nc"` except that it is empty for the first element of the "collision group" and prefixed by a "_" for the others. For example, with the expression : `%dmd%ncs.%e` `
File |  | Modification date |  | Result
Image1.jpg |  | 01/01/2004 |  | 20040101.jpg
Image2.jpg |  | 12/12/2004 |  | 20041212.jpg
Image3.jpg |  | 01/01/2004 |  | 20040101_001.jpg
Image4.jpg |  | 12/12/2004 |  | 20041212_001.jpg
Image5.jpg |  | 12/12/2004 |  | 20041212_002.jpg
Image6.gif |  | 12/12/2004 |  | 20041212_003.gif
`
`%ncf` | same as `"%nc"` except that the path is not taken into account. Only the file name parts are compared
`%ncfs` | same as `"%ncs"` but on the file name parts
`%ns` | the number of selected files
`%p` | a parent directory (a digit can indicate the level). For example, for `"C:\IMAGE\SPORT\2006\IMG001.jpg"` : `
%p |  | gives |  | 2006
%p2 |  | gives |  | SPORT
%p3 |  | gives |  | IMAGE
`
`%pa` | the absolute path to the file (ending with a path separator character, `'\'` under Windows)
`%pr` | the relative path to the file (ending with a path separator character, `'\'` under Windows)
The following variables are independant of the file they are computed on.
`%P` | Siren's current path. For example, for `"C:\IMAGE\SPORT\2006\IMG001.jpg"` : In standard loading mode : `
%pa |  | gives |  | C:\IMAGE\SPORT\2006\
%pr |  | gives |  | "" (empty string)
%P |  | gives |  | C:\IMAGE\SPORT\2006\
` In the loading mode with the sub directories, if Siren's current directory is `"C:\IMAGE"` : `
%pa |  | gives |  | C:\IMAGE\SPORT\2006\
%pr |  | gives |  | SPORT\2006\
%P |  | gives |  | C:\IMAGE\
`
`%Pe` | the path to Siren's executable file
`%D` | the current date and time
`%Dd` | the current date
`%Dt` | the current time
`%Rn` | a pseudo random numeric string. It can be followed by a `{}` modifier. The usage is : `{ l, i, a }` `l` : length `i` : minimum value, optional `a` : maximum value, optional
`%Ra` | a pseudo random alphabetical string
`%Rs` | a pseudo random alphanumeric string
`%C` | line extracted from the clipboard following the file selection order. A digit can indicate an absolute line number. It can be specified between `"{}"` too. Examples : `
The Group - %C.%e
%C1 - %C{2} - %f
`
`%T` | line extracted from a text file following the file selection order. A digit can indicate an absolute line number. It can be followed by a `{}` modifier. The usage is : `{ "f", n }` `f` : the file name from which the line has to be extracted, optional `n` : line number, optional As the character `'\'` is an escape character, the ones present in the paths have to be doubled. If the file name is not indicated then the last previously named is used. There is no limit to the number of files that can be referenced in an expression. Examples : `
%T{"C:\\fr.txt"}
%T{"C:\\fr.txt",2}
%T1{"C:\\fr.txt"}_%T2(10,2)
Fic_%T{"C:\\temp\\fa.txt"} - %T1 - %T{"D:\\fb.txt"}.txt
`

#### Group of "audio" information

`%Ab` | the bitrate
`%As` | the sampling rate
`%AM` | the mode (mono/stereo/...)
`%Ad` | the duration
`%Ai` | some information

#### Group of "id3v1 tag" information

`%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

`%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)
`%AD` | the disk
`%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

`%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

`%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
`%VDd` | the date of a DV avi
`%VDdd` | the date of a DV avi "date part"
`%VDdt` | the date of a DV avi "time part"
`%VDt` | the time code of a DV avi

#### Group of "image" information

`%Ix` | the width
`%Iy` | the height
`%Ib` | the number of bits per pixel
`%Ii` | some information

#### Group of "exif" information

The "official" name of the tag is used as description.

`%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"
`%XSt` | SubsecTime
`%Xwp` | WhitePoint
`%Xpc` | PrimaryChromaticities
`%Xyc` | YCbCrCoefficients
`%Xyp` | YCbCrPositioning
`%Xbw` | ReferenceBlackWhite
`%Xcy` | Copyright
`%Xeo` | ExifOffset
`%Xgo` | GPSOffset
`%Xto` | ThumbnailOffset
`%Xts` | ThumbnailSize
`%Xet` | ExposureTime
`%Xfn` | FNumber
`%Xep` | ExposureProgram
`%Xsy` | SpectralSensitivity
`%Xsr` | ISOSpeedRatings
`%Xve` | ExifVersion
`%Xdo` | DateTimeOriginal
`%Xdod` | DateTimeOriginal "date part"
`%Xdot` | DateTimeOriginal "time part"
`%XSo` | SubsecTimeOriginal
`%Xdd` | DateTimeDigitized
`%Xddd` | DateTimeDigitized "date part"
`%Xddt` | DateTimeDigitized "time part"
`%XSd` | SubsecTimeDigitized
`%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
`%Xui` | ImageUniqueID
`%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 "iptc" information

The "official" name of the tag is used as description.

`%Ybl` | ByLine
`%Ybt` | BylineTitle
`%Ycy` | Copyright
`%Ycr` | Credit
`%Ysr` | Source
`%Ycw` | CaptionWriter
`%Ycp` | Caption
`%Yhl` | HeadLine
`%Ysi` | SpecialInstr
`%Yon` | ObjectName
`%Ydc` | DateTimeCreated
`%Ydcd` | DateTimeCreated "date part"
`%Ydct` | DateTimeCreated "time part"
`%Ydr` | DateTimeReleased
`%Ydrd` | DateTimeCreated "date part"
`%Ydrt` | DateTimeCreated "time part"
`%Yct` | City
`%Ysl` | SubLocation
`%Yst` | State
`%Ycc` | CountryCode
`%Yco` | Country
`%Yot` | OriginalTrsf
`%Yca` | Category
`%Ysc` | SupplCategories
`%Yes` | EditStatus
`%Yji` | JobId
`%Ypg` | Program
`%Ypv` | ProgramVersion
`%Ypr` | Priority
`%Yoc` | ObjectCycle
`%Ykw` | Keywords

#### Group of "document" information

`%Ot` | the title
`%Os` | the subject
`%Ov` | the version
`%Oa` | the author
`%Od` | the destination
`%Oc` | the comments
`%Oi` | some information
`%OI` | the ID
`%Ok` | the keywords
`%On` | the creation date
`%Ond` | the creation date "date part"
`%Ont` | the creation date "time part"
`%Om` | the modification date
`%Omd` | the modification date "date part"
`%Omt` | the modification date "time part"
`%OA` | the application
`%ON` | the company
`%OC` | the copyright
`%OT` | the trademarks
`%Ou` | the URL
`%OF` | the number of files
`%OP` | the number of pages
`%OL` | the number of lines
`%OW` | the number of words
`%OB` | the number of chars