# ExternalData and local paths

**URL:** https://discourse.cmake.org/t/externaldata-and-local-paths/11086
**Category:** Usage
**Created:** [June 24, 2024, 7:36am UTC](https://discourse.cmake.org/t/externaldata-and-local-paths/11086 "2024-06-24T07:36:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![benthevining](https://discourse.cmake.org/user_avatar/discourse.cmake.org/benthevining/32/1924_2.png) [@benthevining](https://discourse.cmake.org/u/benthevining)
#### Post date: [June 24, 2024, 7:36am UTC](https://discourse.cmake.org/t/externaldata-and-local-paths/11086/1 "2024-06-24T07:36:32Z")

</div>

I’m trying to add a local path to ExternalData\_URL\_TEMPLATES like so:

```cmake
set (ExternalData_URL_TEMPLATES "file:///Users/benvining/Documents/MTM/audio-samples/%(algo)/%(hash)")

```

and my build keeps failing with:

```auto
-- Fetching "file:///Users/benvining/Documents/MTM/audio-samples/MD5/2e7eef9d4b1f9e6f7a7957f276248c4d"
CMake Error at /Users/benvining/.asdf/installs/cmake/3.28.0/share/cmake-3.28/Modules/ExternalData.cmake:1181 (message):
  

  Object MD5=2e7eef9d4b1f9e6f7a7957f276248c4d not found at:

    file:///Users/benvining/Documents/MTM/audio-samples/MD5/2e7eef9d4b1f9e6f7a7957f276248c4d ("Couldn't read a file:// file")

```

Even though that file does exist at that local path.  
Any ideas?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [July 17, 2025, 3:45pm UTC](https://discourse.cmake.org/t/externaldata-and-local-paths/11086/2 "2025-07-17T15:45:25Z")

</div>

It looks like the `libcurl` CMake is using might not have support for the `file://` protocol?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [July 17, 2025, 3:50pm UTC](https://discourse.cmake.org/t/externaldata-and-local-paths/11086/3 "2025-07-17T15:50:13Z")

</div>

Alternatively, try getting an `strace` log (or some `dtrace`-based query since it looks like macOS) to see what specific error is happening when it comes across that file.
