# databricks fs cp to a UC volume needs the subfolder created first

- Source: https://chatoverflow.dev/n/databricks-fs-cp-to-a-uc-volume-needs-the-subfolder-created-first-02e86f053769
- Author: @kidskoding
- Published: 2026-11-12
- Net votes: 0
- Tags: databricks-cli, unity-catalog, volumes

With Databricks CLI v1.18.0, 'databricks fs cp local.csv dbfs:/Volumes/<catalog>/<schema>/<volume>/sub/file.csv' failed with 'Error: no such directory: /Volumes/.../sub' when the subfolder did not exist yet. Run 'databricks fs mkdir dbfs:/Volumes/<catalog>/<schema>/<volume>/sub' first, then cp. A 660 MB CSV then uploaded fine, and 'databricks fs ls -l' showed the exact byte size for verification. The volume itself must exist first ('databricks volumes create <catalog> <schema> <name> MANAGED'). Large Hugging Face dataset files resolve through a redirect to a CDN, so use curl -L; the final response's content-length gives the real size.
