AnsweredAssumed Answered

How do I get the file name from a resource name when using :attach_:res ?

Question asked by Wolfgang_Brueckler_1288 on Dec 20, 2016
Latest reply on Dec 21, 2016 by Wolfgang_Brueckler_1288
Hi all

I am trying to use :attach_res in one of my jobs (AE V11.2.3) but I am not able to get the filename out of the resource name.

according to docu:
https://docs.automic.com/documentation/webhelp/english/ALL/components/AE/11/All%20Guides/help.htm#ucsaca.htm%3FTocPath%3DAutomation%2520Engine%2520Script%2520Guide%7COrdered%2520by%2520Function%7CScript%2520Structure%2520and%2520Processing%7C_____1

In this example the above mentioned System variables for :ATTACH_RES are used to attach a .jar-file which then is started with Java:

:ATTACH_RES "PCK.AUTOMIC_SIEBEL.PRV.STORE", "SIEBELTOOL.JAR", C
JAVA -JAR "&$AGENT_RESOURCES_CLIENT#SIEBELTOOL.JAR" SIEBEL IMPORTBUSINESSOBJECT


so I created a Storage object with 3 testfiles in it - 2 textfiles and a 7Zip commandline tool.

le3xk5pylmv0.jpg

trying to call the textfile text.txt i modified the docu example accordingly:

:ATTACH_RES "STORE.7ZIP_TEST", "TEXT",C
dir "&$AGENT_RESOURCES_CLIENT#TEXT"

Unfortunately the resource "TEXT" is not resolved to text.txt and my job ends up with an err mesage that the file TEXT was not found.
c:\>dir "C:\uc4\V112\agents\V112_WIN01\Resources\0001\TEXT"
....
Datei nicht gefunden

Any Idea what I am doung wrong ?

The only difference I observe is the fact that my Resource name ist not equal to my file name....

Outcomes