Native command: args reference workspace files

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts Page 1 of 1

rickc

Posts: 5
Joined: Wed Sep 10, 2014 11:33 am

Post by rickc » Mon Oct 19, 2015 10:31 am
I have a project that creates an XML file in a workspace. The xml file can be referenced by variable ${xmlfile}.
I would like to add an "exec task" to call a native command(.net exe). The native command will take the xml and reformat to pdf.

The .net exe has two arguments: an input filename(xml) and an output filename(pdf).

How do I call the native command and pass the path to ${xmlfile} ?
I would also like the output(pdf) to be written to the workspace.

Here is an excerpt of the project's xml:
Code: Select all
		<exec label="Convert XML to PDF" executable="D:\Tools\myxml2pdf.exe" version="1.0" onError="continue">
			<arg value="[b]D:\Tools\source\xml.xml[/b]" />
			<arg value="[b]tempchu_output.pdf[/b]" />
		</exec>
The arguments shown here are only for test purposes. I'd like to replace them with references to files in the workspace.


RickC

Support_Rick

Support Specialist
Posts: 590
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Mon Oct 19, 2015 11:27 am
RickC

Getting access to the FileName and/or Workspace location is easily done by addressing the System Variables / Functions.

When you get to the prompt, click on the [$ Var] button at the end. This will give you the Wizard.

You can utilize file attributes to get to the file information. (Path, FileName, Extension, Size, etc)

Also, you can select the "system.job.workSpace" variable to point to the currently defined Job Workspace.

For additional help:

This link will give you the details about File Attributes

And going into the Help | Online Help will give you access to training videos that explain attributes and variables as well.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
2 posts Page 1 of 1