I’m trying to add a step to create a folder using the community step template File System - Create Folder but no substitution is happening for the folder name parameter. I’ve set it up as
The folder path to create on the filesystem: “#{Octopus.Action.Package.InstallationDirectoryPath}\Contexts”
but this is copied verbatim, so the script fails with “Creating folder #{Octopus.Action.Package.InstallationDirectoryPath}\Contexts” with permissions.
…
Error
InvalidArgument: Illegal characters in path."
I’ve tried it as a child of the deployment to IIS step and as a separate Step 2, both with the same result.
How do I get it to create a sub-folder under the deployed folder?
The variable Octopus.Action.Package.InstallationDirectoryPath is not expanded because it is not available in the step, and any unmatched variable is reproduced verbatim.
Specifically the Octopus.Action.Package.InstallationDirectoryPath variable is not exposed by the Create Folder step, as it does not deploy a package. It sounds like you may be trying to get the value of this variable from a previous step, in which case the format of the variable is [Octopus.Action[Previous Step Name].Output.Octopus.Action.Package.InstallationDirectoryPath].