Variables
Variables let you inject a string into a field.
The available variables are based on the flow nodes before the current node.
E.g. if you use a Video File node this will insert {vi.Video.Codec} etc
Using in Text Fields
To use a variable inside a text field, they must be wrapped in {}.
For example, {file.Name}
Typing { will open up a variable selector of available variables.
Using in a Function or Script
To use a variable inside a function or script, call the Variables object
For example,
Variables.file.Name
Always Available
Variable | Description | Type | Example |
---|---|---|---|
temp | The temporary working directory where files are saved to during the flows execution | string | /temp/Runner-44d4501b-7599-4f88-88f5-e8a95d57bcde |
ext | Extension of working file | string | .mkv |
file.OriginalName | The original library file name unmodified/mapped | string | /mnt/library/file.mkv |
file.Name | Short filename of working file with extension | string | b0d11434-8fce-4d3c-ad55-774e05061bdf.mkv |
file.NameNoExtension | Short filename of working file without extension | string | b0d11434-8fce-4d3c-ad55-774e05061bdf |
file.FullName | Full filename of working file | string | /temp/Runner-44d4501b-7599-4f88-88f5-e8a95d57bcde/b0d11434-8fce-4d3c-ad55-774e05061bdf.mkv |
file.Extension | Extension of working file | string | .mkv |
file.Size | Size of working file in bytes | long | 100000000 |
folder.FileName | Short folder name of working file | string | Runner-44d4501b-7599-4f88-88f5-e8a95d57bcde |
folder.FullName | Full folder name of working file | string | /temp/Runner-44d4501b-7599-4f88-88f5-e8a95d57bcde |
file.Create | Creation DateTime of original file | DateTime | Javascript new Date() |
file.Create.Year | Creation Year of original file | int | 2020 |
file.Create.Month | Creation Month of original file | int | 3 |
file.Create.Day | Creation Day of original file | int | 28 |
file.Modified | Modified DateTime of original file | DateTime | Javascript new Date() |
file.Modified.Year | Modified Year of original file | int | 2020 |
file.Modified.Month | Modified Month of original file | int | 3 |
file.Modified.Day | Modified Day of original file | int | 28 |
file.Modified | Modified DateTime of original file | DateTime | Javascript new Date() |
file.Modified.Year | Modified Year of original file | int | 2020 |
file.Modified.Month | Modified Month of original file | int | 3 |
file.Modified.Day | Modified Day of original file | int | 28 |
file.Orig.Extension | Extension of original file | string | .mkv |
file.Orig.FileName | Short filename of original file with extension | string | TestFile.mkv |
file.Orig.FileNameNoExtension | Short filename of original file without extension | string | TestFile |
file.Orig.FullName | Full filename of original file | string | C:\Files\TestFile.mkv |
file.Orig.Size | Size of original file in bytes | long | 100000000 |
folder.Orig.Name | Short folder name of original file | string | Files |
folder.Orig.FullName | Full folder name of original file | string | C:\Files |
time.processing | The total processing time of the flow | string | 00:12:31 |
time.processingRaw | The total processing time of the flow as a timespan object | TimeSpan | System.TimeSpan |
time.now | The current time, localised | string | 12:45 p.m. |
Formatters
When using a variable inside a text field, you can alter how that variable is displayed by using a formatter
Formatter | Name | Description | Example |
---|---|---|---|
! | UpperCase | Converts the value to upper case | MYVALUE |
0 | Digits | Will pad a number with the number of 0s specified, eg :0000 for 0001 , 0010 | 0002 |
date | Date | Formats a value as a date | |
time | Time | Formats a value as a time | |
datetime | DateTime | Formats a value as a datetime | |
MyhHmsft:-_ | DateTime | Formats a value as a custom date time string, eg d-MMM-yyyy h:mm:ss tt | 2-Nov-2022 5:34:49 p.m. |
size | Size | Formats a value in B, KB, MB, GB, TB. | 1.4GB |
file | File | Formats a value as a safe file name ans removes or replaces any unsafe chartacters | my-safe-name |
To use a formatter append | then the format, eg
{file.Name!} - {file.Size|size} {file.Create|dd-MM-yyyy} {file.Create|time}
Produces
FILENAME.EXT - 32.78 GB 29-10-2022 11:41
Hint: You can even use a formatter on any value you type in, for example
{645645654|size}
Produces
645.65 MB