# DAI - Distributed Execution - Result path

**URL:** <https://forums.eggplantsoftware.com/t/dai-distributed-execution-result-path/14251>\
**Category:** Eggplant DAI\
**Tags:** eggplant, sensetalk, eggplant-functional\
**Created:** [December 19, 2024, 3:48pm UTC](https://forums.eggplantsoftware.com/t/dai-distributed-execution-result-path/14251 "2024-12-19T15:48:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![scsvel](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/scsvel/32/316_2.png) [@scsvel](https://forums.eggplantsoftware.com/u/scsvel)\
**Post date:** [December 19, 2024, 3:48pm UTC](https://forums.eggplantsoftware.com/t/dai-distributed-execution-result-path/14251/1 "2024-12-19T15:48:46Z")

</div>

**—3 related questions on the files—**  
**1)** I have the script to generate some custom log file using the log file generated by Eggplant. So I am trying to access the log file like:

```auto
set myRes to the result
If myRes is empty Then
	set Global reportFolder to folder of logfile of the last item of ScriptResults()
else
	set Global reportFolder to parent folder of myRes.LogFile
End If

Log Global reportFolder

```

This was worked perfect when I directly connect any machine and execute the tests from Studio. Now, I am running from DAI site using the DAI Run Agent, and always getting printed like below for the global reportFolder which I am trying to get in the above code.

```auto
{asText = ""; directory = ""; folder = ""; "long name" = ""; name = ""; objectType = fileDescription; }

```

**2)** Also, I am using all the relative path to fetch the screenshot path and others. When I looked at the folder where the DAI Run Agent is fetching latest suites from my git like:

> C:\ProgramData\Eggplant\Agent\suites\{env-name}\.run\git\_repo\mySuite.suite

But couldn’t find any screenshots or files under the Results folder of the suite here. So, how I can access these files?

**3)** Also, How I can know if the script is running using DAIRunAgent or running directly by connecting the SUT with Eggaplant Studio itself using some sensetalk script?

---

<div class="post-metadata">

**Author:** ![DaveHester](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/davehester/32/104_2.png) [@DaveHester](https://forums.eggplantsoftware.com/u/DaveHester)\
**Post date:** [December 19, 2024, 5:40pm UTC](https://forums.eggplantsoftware.com/t/dai-distributed-execution-result-path/14251/2 "2024-12-19T17:40:39Z")

</div>

As you have discovered, DAI stores its results, both logs and screenshots, differently than in Eggplant Functional. If you want to access your screenshots from your file system instead of from within DAI, include the path where you want them stored as part of your CaptureScreen() command. The DAI Run Agent is a means for DAI to communicate with ePF which is the engine for your code. Any scripts triggered from within DAI will use a Run Agent. As to the question concerning the log folder, it would be helpful to understand the use case for returning that path. There may not be a precise 1:1 match for what you want in DAI compared to ePF, but instead there may be a different may to accomplish the same thing.

---

<div class="post-metadata">

**Author:** ![scsvel](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/scsvel/32/316_2.png) [@scsvel](https://forums.eggplantsoftware.com/u/scsvel)\
**Post date:** [December 19, 2024, 5:50pm UTC](https://forums.eggplantsoftware.com/t/dai-distributed-execution-result-path/14251/3 "2024-12-19T17:50:49Z")

</div>

Like you said, I am passing the path for the CaptureScreen. The path that I am passing is the folder where the log file should be, and that’s where I am stuck now as the DAI Run Agent uses log differently, and I couldn’t get the proper results folder path.

I would like to know if it is possible to set the results folder from my script so that everything will go into that folder which I can use the way I want it or any files I need.?

---

<div class="post-metadata">

**Author:** ![JoostVoeten](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/joostvoeten/32/91_2.png) [@JoostVoeten](https://forums.eggplantsoftware.com/u/JoostVoeten)\
**Post date:** [December 30, 2024, 9:58am UTC](https://forums.eggplantsoftware.com/t/dai-distributed-execution-result-path/14251/4 "2024-12-30T09:58:48Z")

</div>

So what do you want to do with the log and screen captures? They are stored in DAI so we can always extract them from there. Just wondering what you would like to do with them?

---

<div class="post-metadata">

**Author:** ![scsvel](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/scsvel/32/316_2.png) [@scsvel](https://forums.eggplantsoftware.com/u/scsvel)\
**Post date:** [December 30, 2024, 12:51pm UTC](https://forums.eggplantsoftware.com/t/dai-distributed-execution-result-path/14251/5 "2024-12-30T12:51:53Z")

</div>

Like I said in my initial question, we are generating custom log file (no tech details) for which we were using this log file to fetch the details like each step details, screenshot names, etc.

---

<div class="post-metadata">

**Author:** ![JoostVoeten](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/joostvoeten/32/91_2.png) [@JoostVoeten](https://forums.eggplantsoftware.com/u/JoostVoeten)\
**Post date:** [January 8, 2025, 7:56am UTC](https://forums.eggplantsoftware.com/t/dai-distributed-execution-result-path/14251/6 "2025-01-08T07:56:45Z")

</div>

Which version of DAI are you currently on?

---

<div class="post-metadata">

**Author:** ![scsvel](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/scsvel/32/316_2.png) [@scsvel](https://forums.eggplantsoftware.com/u/scsvel)\
**Post date:** [January 8, 2025, 12:57pm UTC](https://forums.eggplantsoftware.com/t/dai-distributed-execution-result-path/14251/7 "2025-01-08T12:57:44Z")

</div>

It’s DAI version 7.5.0-9.
