# Is there any way to copy a file from Eggplant's Resources folder to the SUT's any Local Folder?

**URL:** <https://forums.eggplantsoftware.com/t/is-there-any-way-to-copy-a-file-from-eggplants-resources-folder-to-the-suts-any-local-folder/8673>\
**Category:** Eggplant Functional\
**Tags:** script, sensetalk, eggplant-functional\
**Created:** [December 4, 2023, 9:48am UTC](https://forums.eggplantsoftware.com/t/is-there-any-way-to-copy-a-file-from-eggplants-resources-folder-to-the-suts-any-local-folder/8673 "2023-12-04T09:48:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![EggplantSam](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/e/b38774/32.png) [@EggplantSam](https://forums.eggplantsoftware.com/u/EggplantSam)\
**Post date:** [December 4, 2023, 9:48am UTC](https://forums.eggplantsoftware.com/t/is-there-any-way-to-copy-a-file-from-eggplants-resources-folder-to-the-suts-any-local-folder/8673/1 "2023-12-04T09:48:07Z")

</div>

I want to copy (Transfer) a file from Eggplant’s Resources folder to the SUT machine.

I tried the below command taken from the Eggplant Documentation but it is not working.

copy file “C:/MyRepoFolder/Main.suite/Resources/TestFile.txt” to “SUT:C/Temp”

Its not recognizing the Remote machine (SUT Path) Path.

Is there any other way to achieve this?

---

<div class="post-metadata">

**Author:** ![EggplantBlandine](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/eggplantblandine/32/203_2.png) [@EggplantBlandine](https://forums.eggplantsoftware.com/u/EggplantBlandine)\
**Post date:** [December 4, 2023, 9:47pm UTC](https://forums.eggplantsoftware.com/t/is-there-any-way-to-copy-a-file-from-eggplants-resources-folder-to-the-suts-any-local-folder/8673/2 "2023-12-04T21:47:23Z")

</div>

You can try this, but make sure you have a shared drive accesible on the SUT side.

//Moving Drive from Resources Section to Shared Drive.  
set global reportExcelName to “MovedReport1.xlsx” – That is the name of the new report that will be moved to shared drive  
copy file ResourcePath(“MyNewreport.xlsx”) to ResourcePath(global reportExcelName) – Make sure you have a report already created to copy in the resourcepath

set myExternalStoragePath to “C:\Users\blanscot\OneDrive - Keysight Technologies\Documents”  
copy folder ResourcePath(global reportExcelName) into myExternalStoragePath

* * *

If it does not work for you, a peer suggested this:

> **[robocopy](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy)**
>
> Reference article for the robocopy command, which copies file data from one location to another.

Shell “c:\windows\system32\cmd.exe”,“/c”&&“robocopy”&&“/MIR”&&quote&“\TESTING-SRV\Users\Testing-SRV\Documents\Surath Durgaprasad”&quote&&quote&“C:\Users\DurgaPrasad S\Desktop\Temp”

---

<div class="post-metadata">

**Author:** ![DSDeep](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/d/c89c15/32.png) [@DSDeep](https://forums.eggplantsoftware.com/u/DSDeep)\
**Post date:** [December 5, 2023, 5:07pm UTC](https://forums.eggplantsoftware.com/t/is-there-any-way-to-copy-a-file-from-eggplants-resources-folder-to-the-suts-any-local-folder/8673/3 "2023-12-05T17:07:01Z")

</div>

A pretty big workaround, but you could put the file contents in the remote clipboard, then use eggplant scripting to go through the steps to create a new file on the SUT and put the contents of the clipboard in it.

---

<div class="post-metadata">

**Author:** ![sds2user](https://forums.eggplantsoftware.com/user_avatar/forums.eggplantsoftware.com/sds2user/32/12_2.png) [@sds2user](https://forums.eggplantsoftware.com/u/sds2user)\
**Post date:** [January 9, 2024, 4:44pm UTC](https://forums.eggplantsoftware.com/t/is-there-any-way-to-copy-a-file-from-eggplants-resources-folder-to-the-suts-any-local-folder/8673/4 "2024-01-09T16:44:59Z")

</div>

The way I achieve this is with a git repo.  
If I know a test needs a resource available on the local sut then that resource gets commited to a “sutresources” git repo.  
A clone of that "sutresources repo is made on the sut.  
At the beginning of every run I do a git pull to ensure the resource will be available.  
Then the test can interact with that repo on the sut.  
Hope that makes sense.

---

<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:** [January 29, 2024, 7:55pm UTC](https://forums.eggplantsoftware.com/t/is-there-any-way-to-copy-a-file-from-eggplants-resources-folder-to-the-suts-any-local-folder/8673/5 "2024-01-29T19:55:05Z")

</div>

The file and folder commands within SenseTalk reference the client machine (i.e. the machine running Eggplant Functional) and not the SUT machine. The simplest way to move/copy files from your client machine to any other machine, SUT or not, is to make that location available as a lettered drive on the client machine. For example, you could map your S: drive to c:\temp on your SUT machine. I will say that your mention of the SUt machine makes me wonder what you will do with the file on the SUT. Knowing the answer to that might allow the forum to provide a more complete answer.
