# Nextflow not creating output directory

**URL:** <https://community.seqera.io/t/nextflow-not-creating-output-directory/1909>\
**Category:** Ask for help\
**Created:** [March 7, 2025, 10:32pm UTC](https://community.seqera.io/t/nextflow-not-creating-output-directory/1909 "2025-03-07T22:32:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![clarke15\_roche](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/clarke15_roche/32/1606_2.png) [@clarke15\_roche](https://community.seqera.io/u/clarke15_roche)\
**Post date:** [March 7, 2025, 10:32pm UTC](https://community.seqera.io/t/nextflow-not-creating-output-directory/1909/1 "2025-03-07T22:32:43Z")

</div>

I have the -output-dir flag passed to the CLI with the name of a directory for published results, however nextflow is not creating the output directory, nor is it creating a results directory if it’s omitted. I’m using the current stable release with the publish directive in the anonymous workflow.

---

<div class="post-metadata">

**Author:** ![ewels](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/ewels/32/1_2.png) [@ewels](https://community.seqera.io/u/ewels)\
**Post date:** [March 11, 2025, 9:18pm UTC](https://community.seqera.io/t/nextflow-not-creating-output-directory/1909/2 "2025-03-11T21:18:26Z")

</div>

Hi @clarke15_roche,

Could you please post a code snippet? The output file publishing behaviour can vary a bit depending on how you write your Nextflow code.

You may find this part of the training relevant / useful:

> **[Part 1: Hello World - training.nextflow.io](https://training.nextflow.io/latest/hello_nextflow/01_hello_world/#31-publish-outputs)**

And the associated video:

https://www.youtube.com/embed/8X2hHI-9vms?feature=oembed&wmode=opaque&list=PLPZ8WHdZGxmXiHf8B26oB_fTfoKQdhlik&start=499

Phil
