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 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 allows fetching values from different objects. For example, the following logicals groups can be named:

  • Sources

  • Cinegy PCS task

  • Cinegy Archive job

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 empty string for Cinegy Archive sources.

{src.location}

Translates into the full file path without the file name for file sources or 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 name of the application that created the conversion task.

{task.creator.host}

Translates into the name of the computer on which the conversion task was created.

{task.handler.name}

Translates into the name of the application on which the conversion task is processed.

{task.handler.host}

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

Cinegy Archive Job Macros

The following macros are supported:

Macro Description

{job.name}

Translates into the Cinegy Archive job node name.

{job.createdby}

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

{job.created}

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

{job.modifiedby}

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

{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.meta.internal_name}

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

Environment Variables

The 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 a full list of supported environment variables, refer to the article.

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/2015

D

Long date

Friday, April 17, 2015

f

Full date/time (short time)

Friday, April 17, 2015 3:12 PM

F

Full date/time (long time)

Friday, April 17, 2015 3:12:57 PM

g

General date/time (short time)

4/17/2015 3:12 PM

G

General date/time (long time)

4/17/2015 3:12:57 PM

M, m

Month/day

April 17

O, o

Round-trip date/time

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

R, r

RFC1123

Fri, 17 Apr 2015 15:12:57 GMT

s

Sortable date/time

2015-04-17T15:12:57

t

Short time

3:12 PM

T

Long time

3:12:57 PM

u

Universal sortable date/time

2015-04-17 15:12:57Z

U

Universal full date/time

Friday, April 17, 2015 3:12:57 PM

Y, y

Year and month

April, 2015

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.