An automatic macros substitution feature may be very handy, for example, when creating multiple files via Cinegy Convert. Naming such files in an automated manner helps to avoid file name conflicts and maintain the logical structure of the storage. This article explains how to use different macros and where they are applicable.

Supported Macro Types

The following macro types are supported:

Type Description

Metadata

These macros will be translated by the system into corresponding metadata values, taken, for example, from Cinegy Archive or a source file.

Environment

These macros will be translated by the system into corresponding Windows OS environment variable values.

Automatically generated

These macros will be translated by the system into automatically generated values like time, date, GUID, etc.

This automatic macros substitution feature is already available in Cinegy Convert and will soon be supported by other Cinegy products.

Metadata Macros

The metadata macros allow fetching values from different objects. For example, the following logical groups can be named:

Please see the following sections for additional details on each metadata object source.

Source Macros

The following macros are supported:

Macro Description

{src.name}

Translates into the full file name for file sources or the node name for Cinegy Archive sources.

{src.shortname}

Translates into the file name without extension for file sources or the node name for Cinegy Archive sources.

{src.ext}

Translates into the file extension for file sources or the empty string for Cinegy Archive sources.

{src.location}

Translates into the full file path without the file name for file sources or the location in the database for Cinegy Archive sources.

{src.meta.internal_name}

Translates into the value of the defined custom metadata field.

Cinegy PCS Task Macros

The following macros are supported:

Macro Description

{task.id}

Translates into the conversion task ID.

{task.name}

Translates into the conversion task name.

{task.priority.value}

Translates into the conversion task priority as a numeric value.

{task.priority.name}

Translates into the conversion task priority name, e.g. High, Medium, Low, etc.

{task.created}

Translates into the conversion task creation date and time.

{task.handled}

Translates into the conversion task processing start date and time.

{task.creator.name}

Translates into the application name that creates the conversion task.

{task.creator.host}

Translates into the computer name on which the conversion task is created.

{task.handler.name}

Translates into the application name in which the conversion task is processed.

{task.handler.host}

Translates into the computer name on which the conversion task is processed.

Cinegy Archive Job Macros

The following macros are supported:

Macro Description

{job.id}

Translates into the Cinegy Archive job node ID.

{job.name}

Translates into the Cinegy Archive job node name.

{job.creator.name}

Translates into the name of the user, who created the Cinegy Archive job node.

Note
If a macro contains the \ symbol, the folder containing the defined name will be created. The symbols like *, ?, - are filtered and will be replaced with the _ symbol.

{job.created}

Translates into the Cinegy Archive job node creation date and time.

{job.modifier.name}

Translates into the name of the user, who edited the Cinegy Archive job node.

Note
If macro contains the \ symbol, the folder containing the defined name will be created. The symbols like *, ?, - are filtered and will be replaced with the _ symbol.

{job.modified}

Translates into the Cinegy Archive job node editing date and time.

{job.comment}

Translates into the Cinegy Archive job node comment.

{job.description}

Translates into the Cinegy Archive job node description.

{job.error}

Translates into the Cinegy Archive job node error.

{job.meta.internal_name}

Translates into the name of the custom metadata field created for the Cinegy Archive job node.

The example below illustrates a typical scenario for using additional symbols for the {job.creator.name} macro:

  1. In the target folder path C:\Temp define the job node creator name job.creator.name == Munich / user.

  2. Define the file name FileName == "Some Name" {job.creator.name}.

The output will be the following: The "user.mxf" (mp4, etc.) will be created in "Some Name Munich" folder. The file can be found in the following location: C:\Temp\ Some Name munich.

The same scenario is typical for the {job.modifier.name} macros.

Environment Variables

Environment variables used as placeholder for various system paths, folder and file names, are also supported.

The syntax is as follows: {env.somevariable}.

For example, the {env.USERPROFILE} environment variable represents the path to the folder containing user profile settings.

You can use environment variables when defining various paths and folders.

Important
For more details on supported environment variables, refer to the MSDN website.

Automatically Generated Macros

The following macros are supported:

Macro Description

{uid:format}

Translates into the UID. The "format" parameter is optional. Refer to the table below for the UID format specifiers.

{time:format}

Translates into the time. The "format" parameter is optional. Refer to the table below for the time format specifiers.

UID Format Specifiers

The following table shows the accepted format specifiers for the UID format parameter:

Specifier Return value format Example

N

32 digits

00000000000000000000000000000000

D

32 digits separated by hyphens

00000000-0000-0000-0000-000000000000

B

32 digits separated by hyphens, in braces

{00000000-0000-0000-0000-000000000000}

P

32 digits separated by hyphens, in parentheses

(00000000-0000-0000-0000-000000000000)

X

Four hexadecimal values in braces, where the fourth value is a subset of eight hexadecimal values that is also enclosed in braces

{0x00000000,0x0000,0x0000, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}

Time and Date Format Specifiers

The following table describes the standard date and time format specifiers:

Specifier Return value format Example

d

Short date

4/17/2023

D

Long date

Monday, April 17, 2023

f

Full date/time (short time)

Monday, April 17, 2023 3:12 PM

F

Full date/time (long time)

Monday, April 17, 2023 3:12:57 PM

g

General date/time (short time)

4/17/2023 3:12 PM

G

General date/time (long time)

4/17/2023 3:12:57 PM

M, m

Month/day

April 17

O, o

Round-trip date/time

2023-04-17T15:12:57.0000000-07:00

R, r

RFC1123

Mon, 17 Apr 2023 15:12:57 GMT

s

Sortable date/time

2023-04-17T15:12:57

t

Short time

3:12 PM

T

Long time

3:12:57 PM

u

Universal sortable date/time

2023-04-17 15:12:57Z

U

Universal full date/time

Monday, April 17, 2023 3:12:57 PM

Y, y

Year and month

April, 2023

Note
Time and date format macros are resolved and displayed according to the regional formatting settings specified for the current OS in the Control Panel (Control Panel → Region → Formats).
Important
All examples are given for en-US culture. Refer to the MSDN article for details about date and time representations for different cultures.

The custom date and time format is also supported.

For example, hh:mm:ss tt will display 03:12:57 PM.

Important
For a full list of custom date and time format specifiers, refer to the MSDN article.