ExportExtensions.cfg

Previous Next  Print this Topic

Use an ExportExtensions.cfg text file to customize your export options for files that have been retrieved. This is done by configuring fields seen in export retrieval options for the Phoenix EXP search applications. This capability is intended only for advanced users.

Create an ExportExtensions.cfg using any text editor and save as a plain text document. Once created, it needs to be added to the following path: <install-dir>\Config. See Create an ExportExtensions.cfg - example.
ExportExtensions.cfg is a block structured text file. At the end of this section, there is a sample ExportExtensions.cfg. You can implement the file as is (at the path noted above), or modify the file to meet your own criteria and then implement it.

ExportExtensions.cfg is comprised of at least one or more ExportExtension blocks. An ExportExtension block has two main sections:

Command
Query

Command Section of the Export Extensions Block

The Command section of the block extends from the words "ExportExtension" to the command specification (in the example below). It includes the ExportExtension statement that defines the beginning of an ExportExtension block and includes the execute command and other tokens:

ExportExtension #  This identifies the beginning of the ExportExtension block.

[ # This is the opening brace for the ExportExtension block.

 

 <token>=<value>

 <token>=<value>

 

 Command = <%# %# %# %# ... %U %M ...> # This is REQUIRED statement.

The following block name defines the beginning of an ExportExtension block in an ExportExtensions.cfg file:

Block name

Description

ExportExtension

The beginning of an ExportExtension block.

Required.

Note that the entire block is ignored if there are fewer Query block statements than %# in the Command. For example, if you have three Query block sections and four %#, then the block will not be read.

Command

Description

Command = <command specification>

Define the execute command specification. Along with the command, the command line must enumerate each Query block. See the sample file below for an illustration.

Required.

%# is the substitution query value (where # is a number). Each %# enumerates a Query, one   %# per Query, and can be in any order. The command specification cannot have more %# than Query statements, but you can specify certain blocks by omitting query numbers. For example, to include only query blocks 1, 3, and 7, use <%1, %3, %7>

The following substitution tokens may also be in the Command specification:

%U = User
%M = Host
%D = Date
%T = Time
%P = Path to where the files are retrieved
%O = Filename containing list of files in the export list.

Use tokens to define optional functionality in the Command section. Unless noted, tokens are not necessary. When tokens are omitted, default values are used. Include any of the following tokens when you want to use non-default values:

Token/Value

Description

DeleteWhenDone = <boolean>

Define if files are to be deleted from the local system when the command is complete.

Valid values = true | false

Default = true

Description = <character string>

The tool tip for the label.

Default = ""

DestinationPathname = <pathname>

The path to where the files are exported.

Default = ""

FileNaming = <alpha>

Define how files are named.

Valid values = Original | AtSelection |FilenameOnly.

Default = Original

Label = "<character string>"

The label found in the Export Destination box.

Default = Export Extension

Overwrite = <alpha>

When files are overwritten.

Valid values = Never | Always | IfNewer

Default = Never

RestoreSecurity = <boolean>

Define if original security settings are restored.

Valid values = true | false

Default = true

RestoreTimes = <boolean>

Define times it is used.

Valid values = true | false

Default = true

Query section of the Export Extensions Block

Query block statements describe the controls that appear on the application. You may have any number of queries.

 Query

 [

         <token>=<value>

         <token>=<value>

         <token>=<value>

         <token>=<value>

         <token>=<value>

         <token>=<value>

 ]

 

 Query

 [

         <token>=<value>

         <token>=<value>

         <token>=<value>

         <token>=<value>

         <token>=<value>

         <token>=<value>

 ]

] # This is the closing brace for the ExportExtension block.

The following block name defines the beginning of a Query block in an ExportExtensions.cfg file.

Block name

Description

Query

The beginning of a Query block.

Required

The following tokens can be used in Query blocks:

Query block Type

Valid Token/Values

Description

Checkbox

Name = "<character string>"

The export item's name.

Required

Default = ""

Type = Checkbox

The Query type.

Label = "<character string>"

The label for the control as it will appear in the application.

Default = ""

DefaultValue = <boolean>

The value to load into the control by default.

Valid values = true | false

Defaults = true (checked)

Description = "<character string>"

The tooltip for the control.

Default = ""

Choice

Name = "<character string>"

The export item's name.

Required

Default = ""

Type = Choice

The Query type.

Label = "<character string>"

The label for the control as it will appear in the application.

Default = ""

DefaultValue = <number>

The value to load into the control by default.

Valid values = the number of the entry in the drop-down list

Default = the first choice listed.

If the DefaultValue for a Choice block is greater than the number of Choices entered, the entire ExportExtension block is ignored.

BlankValueOk = <boolean>

Indicate if the value is left blank. Valid for String, Pathname, and Choice only.

Valid values = true | false

Default = true

Description = "<character string>"

The tooltip for the control.

Default = ""

Choice = "<character string>"

A choice statement that can be selected. Must have at least one choice. Can be reused as many times as needed.

Pathname

Name = "<character string>"

The export item's name.

Required

Default = ""

Type=Pathname

The Query type.

Label = "<character string>"

The label for the control as it will appear in the application.

Default = ""

DefaultValue = "<character string>"

The value to load into the control by default.

Valid value= a string

Default = ""

BlankValueOk = <boolean>

Indicate if the value is left blank. Valid for String, Pathname, and Choice only.

Valid values = true | false

Default = true

Description = "<character string>"

The tooltip for the control.

Default = ""

Spin

Name = "<character string>"

The export item's name.

Required

Default = ""

Type = Spin

The Query type.

Label = "<character string>"

The label for the control as it will appear in the application.

Default = ""

DefaultValue = <number>

The value to load into the control by default.

Valid values = a number between the LowerLimit and UpperLimit

Default = the lower limit

If the DefaultValue for a Spin block is not between the LowerLimit and UpperLimit, the entire ExportExtension block  is ignored.

Description = "<character string>"

The tooltip for the control.

Default = ""

LowerLimit = <number>

The lower limit for the spin control.

Default = 0

UpperLimit = <number>

The upper limit for the spin control. Valid only for Spin.

Default = lower limit + 100

String

Name = "<character string>"

The export item's name.

Required

Default = ""

Type = String

The Query type.

Label = "<character string>"

The label for the control as it will appear in the application.

Default = ""

DefaultValue = "<character string>"

The value to load into the control default.

Valid values = a string

Defaults = ""

BlankValueOk = <boolean>

Indicate if the value is left blank. Valid for String, Pathname, and Choice only.

Valid values = true | false.

Default = true

Description = "<character string>"

The tooltip for the control.

Default = ""

A Note About Wildcards

Pay attention to brackets [ ]; there needs to be an opening bracket [ after "ExportExtensions" and a closing bracket ] after the last Query block.

It is best to get familiar with Phoenix EXP's wildcard characters. If you need to use a character that is used by Phoenix EXP as a wildcard, the character must be preceded by an escape character ( \ ). For example, \*This is an example using escape characters in a statement with a wildcard\*.
 
The following are Phoenix EXP wildcards and special characters: ?, *, #, !, ~, ^, &, [ ], { }, \, ".

For more information see Wildcards.

Create an ExportExtensions.cfg - Example

1.Open a text editor, such as WordPad or Notepad, and start a new document. If using WordPad, be sure to create a Text Document (.txt) and not Rich Text Format (.rtf).
2.Copy and paste the following ExportExtensions.cfg sample file into the new document.

# This name is significant and identifies this as an ExportExtension block.

ExportExtension

[

 Description = "Custom"

 

 Label = "Custom"

 

 # This is a REQUIRED statement in an Export Extension block.

 Command = "echo %1 %2 %3 %4 %P %U %M %D %T"

 

 Query

 [

         Name         = "EpisodeTitle"

         Type         = String

         Label        = "Episode Title"

         DefaultValue = ""

         BlankValueOk = true

         Description  = "Provide the episode title for this video group."

 ]

 

 Query

 [

         Name         = "ProductionCompany"

         Type         = Choice

         Label        = "Production Company"

          BlankValueOk = true

         Description  = "What is the production company?"

         Choice       = "Family Media"

         Choice       = "Regional Sports"

         Choice       = "TV Productions"

 ]

 

 Query

 [

         Name         = "VideoId"

         Type         = Spin

         Label        = "Video Group ID"

         DefaultValue = 1001

         Description  = "The ID number of this group of videos."

         LowerLimit   = 1000

         UpperLimit   = 5000

 ]

 

 Query

 [

         Name         = "VideoSources"

         Type         = Checkbox

         Label        = "Video is from multiple sources."

         DefaultValue = false

         Description  = "Is the video from multiple sources?"

 ]

 

 Query

 [

          Name         = "APathname"

          Type         = Pathname

          Label        = "Pathname"

          DefaultValue = ""

          BlankValueOk = false

          Description  = ""

 ]

]

Save the document to <install-dir>/Config, naming it ExportExtensions.cfg.

3.Launch your Phoenix EXP search application.
4.Set the Export Destination. The values for your custom export options are the same as those in your ExportExtensions.cfg file.

In ExportExtensions.cfg, backslash ( \ ) is used as an escape character. Use \ whenever you type characters, such as quotation marks, that Phoenix EXP interprets as code. For example, ExportExtensions.cfg contains the following line: Sample Value for the \"How do you want to export the retrieved files?\" field. In this line, each backslash tells Phoenix EXP that the next character is literal, not a command. While ExportExtensions.cfg contains Sample Value for the \"How do you want to export the retrieved files?\", the Export Job Configuration pane displays Sample Value for the "How do you want to export the retrieved files?" (notice, no backslashes).

6.Close the application.

Once this file is created, you can go back and modify it at any time with different or additional variables. See the above sections for tokens/values to change or add.