Special variables

From Ketarin
Jump to: navigation, search

Main Variables

Additional to the user defined variables, you can use these predefined ones:

Name Description Example Version Required
{file} Location of the downloaded file (only for commands).Remember to enclose this variable in double quotes (”) if the path contains spaces. c:\…\x.exe 1.1
{filesize} Size of the downloaded file in bytes 1482245 1.1
{root} Root of the application startup path c:\ 1.1
{startuppath} Startup path of the current Ketarin instance (without exe file) c:\…\ 1.1
{category} Category of the application Security 1.1
{appname} Name of the application Ketarin 1.1
{appguid} GUID of the application {AC1DB…} 1.1
{url:ext} Extension of the file that is being downloaded exe 1.1
{url:basefile} Base file name of the file that is being downloaded Ketarin-0.9 1.1
{preupdate-url} Only in pre-download command: Final URL from which the application will be downloaded. http://x.y/z.exe 1.5
{property:X} Property of an application. X is the name of a property (like “Name”). For all property names check the XML that is generated when exporting an application. The element names correspond to the property names. 1.1
{time} or {time-x} or {time+x} UNIX timestamp of the current time, where x represents the time zone offset in hours. 1285772250 1.1
{version} FileHippo only: Version of the application 4.3.2 1.1

Date/time variables

The following variables can be used in two ways:

  • as they are (for example {dd}) to extract the values from the current system date.
  • preceded by "f:" (for example {f:dd}) to extract the values from the downloaded file date.
Name Description Example Version Required
{dd} or {f:dd} Day 10 1.1
{ddd} or {f:ddd} Day name Tue 1.1
{dddd} or {f:dddd} Full day name Tuesday 1.1
{hh} or {f:hh} 2 digit hour 10 1.1
{HH} or {f:HH} 2 digit hour (24h) 22 1.1
{mm} or {f:mm} Minute 00-59 10 1.1
{MM} or {f:MM} Month 01-12 10 1.1
{MMM} or {f:MMM} Month abbreviation Oct 1.1
{MMMM} or {f:MMMM} Month full name December 1.1
{ss} or {f:ss} Seconds 00-59 10 1.1
{tt} or {f:tt} AM or PM PM 1.1
{yy} or {f:yy} Year, 2 digits 06 1.1
{yyyy} or {f:yyyy} Year 2006 1.1
{zz} or {f:zz} Timezone offset, 2 digits -05 1.1
{zzz} or {f:zzz} Timezone offset, 2 digits -05:00 1.1

Note: these variables can't be combined (into a single one, for example);
{f:yyyy-MM-dd} is wrong and will not extract the file date formated like "2006-10-15", {f:yyyy}-{f:MM}-{f:dd} should be used for this instead.