# \_\_file\_\_ and Path

`{{ __file__ }}` allows you to access the the path to the YML file.&#x20;

`{{ Path(...) }}` allows you convert any string to a pathlib [Path](https://docs.python.org/3/library/pathlib.html) object. When using this Jinja function, users also get access to Path's [methods and operators](https://docs.python.org/3/library/pathlib.html#methods-and-properties).

`{{ __file__ }}` and `{{ Path(...) }}` can be used together to define relative paths.

```yaml
# profile.yml

default_profile:
  adapters:
    dbt_example:
      type: dbt
      project_dir: "{{ Path(__file__).parent / 'dbt' }}"

```
