# Constructing a default value for a tool input

**URL:** <https://cwl.discourse.group/t/constructing-a-default-value-for-a-tool-input/161>\
**Category:** CWL Questions\
**Created:** [June 24, 2020, 1:15am UTC](https://cwl.discourse.group/t/constructing-a-default-value-for-a-tool-input/161 "2020-06-24T01:15:34Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mrc](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/mrc/32/3_2.png) [@mrc](https://cwl.discourse.group/u/mrc)\
**Post date:** [June 25, 2020, 7:44am UTC](https://cwl.discourse.group/t/constructing-a-default-value-for-a-tool-input/161/4 "2020-06-25T07:44:26Z")

</div>

If this input directory contains only a few files/folders and they have separate value to the workflow (either because you reuse them without the rest of the directory later, or you want to assemble this input directory from components) then you might want to consider making them explicit separate inputs and assemble them using `InitialWorkDirRequirement`. Then you will know the exact path to the metadata CSV and can provide that to the tool without asking the user.

Otherwise you can try this:

```auto
inputs:
  metadata_path:
    doc: path within the provided InputDir to the sample sheet CSV
    type: string?
    default: something.csv
    inputBinding:
       prefix: --sample-sheet=$(inputs.inputDir.path)/

```

If the tool doesn’t accept `--sample-sheet` with the `=` then try this:

```auto
inputs:
  metadata_path:
    doc: path within the provided InputDir to the sample sheet CSV
    type: string?
    default: something.csv

arguments:
  - prefix: --sample-sheet
    valueFrom: $(inputs.inputDir.path)/$(inputs.metadata_path)

```

---

_[View the full topic](https://cwl.discourse.group/t/constructing-a-default-value-for-a-tool-input/161)._
