Octopus deployment and nested folders issue

Gurdip Sira's Avatar

Gurdip Sira

11 Aug, 2017 11:02 PM


I have an asp.net web app in tfs. The path in TFS is as follows:


However, when the code is deployed by Octopus, it deploys samplecode/samplecode2/samplecode2 to the IIS site, whereas I just want the files in the folder samplecode2.

Is there a way to do this?


  1. Support Staff 1 Posted by Kenneth Bates on 14 Aug, 2017 05:33 AM

    Kenneth Bates's Avatar


    Thanks for getting in touch! When Octopus deploys and extracts your package, it will keep the same directory structure as it existed when you initially package it up. While you can use a postdeploy script to move your files after extraction, I would instead recommend packaging it a bit differently - to ensure the structure you're expecting after it gets deployed matches the structure when packaging it. We have great documentation covering TFS integration which may help in your scenario.

    Let me know if this helps and if you have any further questions. :)

    Kind regards,


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac