# Nextflow recursively creates working directory in work folder

**URL:** <https://community.seqera.io/t/nextflow-recursively-creates-working-directory-in-work-folder/2617>\
**Category:** Training\
**Created:** [March 20, 2026, 4:11pm UTC](https://community.seqera.io/t/nextflow-recursively-creates-working-directory-in-work-folder/2617 "2026-03-20T16:11:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![me-nobody](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/me-nobody/32/2390_2.png) [@me-nobody](https://community.seqera.io/u/me-nobody)\
**Post date:** [March 20, 2026, 4:11pm UTC](https://community.seqera.io/t/nextflow-recursively-creates-working-directory-in-work-folder/2617/1 "2026-03-20T16:11:47Z")

</div>

[start\_nextflow.nf](https://community.seqera.io/uploads/short-url/ji0QMDro11fVXrV4egBetW9gud5.nf) (476 Bytes)

 ![recursive_tree](https://europe1.discourse-cdn.com/flex013/uploads/seqera/original/2X/1/1bdf1d35c1064b62411e6e09e380901d0f9ea0f4.png)

 ![nextflow_tree](https://europe1.discourse-cdn.com/flex013/uploads/seqera/original/2X/0/0081d09adfbfd7f3f779f79b39ed50d98e656510.png)

Hi,  
I attended a nextflow training and I was trying to run a simple script in our HPC. what i found was that the working folder was being recursively copied in the work folder. i have attached the script as well as screenshots of the output. please help

---

<div class="post-metadata">

**Author:** ![Fury\_Gaming](https://avatars.discourse-cdn.com/v4/letter/f/ea5d25/32.png) [@Fury\_Gaming](https://community.seqera.io/u/Fury_Gaming)\
**Post date:** [March 24, 2026, 5:27am UTC](https://community.seqera.io/t/nextflow-recursively-creates-working-directory-in-work-folder/2617/2 "2026-03-24T05:27:45Z")

</div>

Hi,  
Nextflow creates a recursive directory structure inside the _work_ folder for each process. This ensures that every process runs in an isolated and containerised environment. It also helps prevent unnecessary re-execution of the same process. If the inputs, outputs, and process script remain unchanged, Nextflow can reuse the previously cached results when you run the workflow with the `-resume` option.  
Fury

---

<div class="post-metadata">

**Author:** ![me-nobody](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/me-nobody/32/2390_2.png) [@me-nobody](https://community.seqera.io/u/me-nobody)\
**Post date:** [March 24, 2026, 9:26am UTC](https://community.seqera.io/t/nextflow-recursively-creates-working-directory-in-work-folder/2617/3 "2026-03-24T09:26:46Z")

</div>

Hi @Fury_Gaming , Thanks a lot! I did not realize that it keeps creating a recursive directory structure. 🙂

---

<div class="post-metadata">

**Author:** ![GeraldineVdA](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/geraldinevda/32/178_2.png) [@GeraldineVdA](https://community.seqera.io/u/GeraldineVdA)\
**Post date:** [April 17, 2026, 8:09pm UTC](https://community.seqera.io/t/nextflow-recursively-creates-working-directory-in-work-folder/2617/4 "2026-04-17T20:09:40Z")

</div>

Hi! Sorry for the lag, I just noticed this question. The recursive folder structure is not expected from normal Nextflow operation – the caching system should link to the original successful execution but would not explain what you’re seeing. Was this from the training you attended?

Our official training explains how Nextflow nromally operates, as seen here: [Part 1: Hello World - training.nextflow.io](https://training.nextflow.io/latest/hello_nextflow/01_hello_world/)
