VMware Cloud Community
jonathank71
Enthusiast
Enthusiast
Jump to solution

Path to items in Resources

vRO v8.5.1

I've uploaded a PowerShell file to Resources with the intention to use the WF 'Copy file from vCO to guest' to be able to run the PS locally on the OS.  But I can't seem to find the path to the file in resources. I just keep getting errors like:

java.io.FileNotFoundException: test.ps1 (No such file or directory) (Workflow:Copy file from vCO to guest / Scriptable task (item1)#13)

I've tried various paths like: /web-root/test.ps1, /resources/test.ps1, /resources/web-root/test.ps1

Anyone know what this path should be?

Thanks!

jonathan

 

0 Kudos
1 Solution

Accepted Solutions
bdamian
Expert
Expert
Jump to solution

Hi Jonathan,

The path of the resources is not a path in the Linux File System, and vRO cannot read and write on the local file system by default but just in a "temp" folder.

What you can do is to read the content of the resource and create a file in the temp folder and then execute the workflow "Copy file from vCO to guest".  

For this task, you can use the object File in vRO to create the file in the "temp" folder. You obtain the temp folder using:

System.getTempDirectory()

 

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian

View solution in original post

0 Kudos
2 Replies
bdamian
Expert
Expert
Jump to solution

Hi Jonathan,

The path of the resources is not a path in the Linux File System, and vRO cannot read and write on the local file system by default but just in a "temp" folder.

What you can do is to read the content of the resource and create a file in the temp folder and then execute the workflow "Copy file from vCO to guest".  

For this task, you can use the object File in vRO to create the file in the "temp" folder. You obtain the temp folder using:

System.getTempDirectory()

 

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
0 Kudos
jonathank71
Enthusiast
Enthusiast
Jump to solution

Thanks, I was kind of thinking that may be the case.  But being able to the get the temp directory path is definitely helpful and gives me something to work with.

jonathan