Copy an extracted package file from package folder to custom installation folder?

Is there a powershell sample that shows how to copy an extracted package file from package folder to custom installation folder?

scott

I tried to use OctopusOriginalPackageDirectoryPath to no avail:

copy $OctopusParameters[“OctopusOriginalPackageDirectoryPath”]\ACME.Integrations.Encapture.DeliveryConnectors.Impl.isl “c:\Program Files (x86)\Imagine Solutions Encapture\Delivery Connectors”

Copy-Item : Cannot bind argument to parameter ‘Path’ because it is null.
Error 18:18:57
At C:\Users\octopus\AppData\Local\Tentacle\Temp\8c21afed-ab56-4060-9d52-15f57af
Error 18:18:57
29fb5.ps1:2 char:5

Hi Scott,

Thanks for getting in touch! The variable is correct. Octopus.Action[StepName].Output.Package.InstallationDirectoryPath is also valid and a better choice if your scripts are outside of the package step.
Could you also try making a variable first ie:

$PackagePath = ($OctopusParameters["Octopus.Action[StepName].Output.Package.InstallationDirectoryPath"] + "\ACME.Integrations.Encapture.DeliveryConnectors.Impl.isl")
copy $PackagePath "c:\Program Files (x86)\Imagine Solutions Encapture\Delivery Connectors"

You will have to replace StepName with the step name.

Let me know how that goes.
Vanessa