# Create a stage where the output is a directory

**URL:** <https://discuss.dvc.org/t/create-a-stage-where-the-output-is-a-directory/1182>\
**Category:** Questions\
**Created:** [April 29, 2022, 4:33pm UTC](https://discuss.dvc.org/t/create-a-stage-where-the-output-is-a-directory/1182 "2022-04-29T16:33:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![0octal](https://avatars.discourse-cdn.com/v4/letter/0/6bbea6/32.png) [@0octal](https://discuss.dvc.org/u/0octal)\
**Post date:** [April 29, 2022, 4:33pm UTC](https://discuss.dvc.org/t/create-a-stage-where-the-output-is-a-directory/1182/1 "2022-04-29T16:33:54Z")

</div>

I have a process that has a dependency on `input.txt`, and its output is a directory with files of the form `outputs/*.txt`.

What is the correct way to specify such a stage? I see from [this tutorial](https://dvc.org/doc/use-cases/versioning-data-and-model-files/tutorial#second-model-version) that you can `dvc add` an entire directory. But is it possible to set this directory as the output from a `dvc run` stage?

---

<div class="post-metadata">

**Author:** ![0octal](https://avatars.discourse-cdn.com/v4/letter/0/6bbea6/32.png) [@0octal](https://discuss.dvc.org/u/0octal)\
**Post date:** [April 29, 2022, 4:46pm UTC](https://discuss.dvc.org/t/create-a-stage-where-the-output-is-a-directory/1182/2 "2022-04-29T16:46:46Z")

</div>

It looks like DVC supports this feature transparently, without any extra configuration. I was able to use `-o` with a directory and it “just worked”. Nice!
