<!-- source: https://docs.codemagic.io/knowledge-others/upload-custom-artifacts/ -->
<!-- last modified: 2022-10-12 -->

# Uploading custom artifacts

> How to upload files to be included in your build artifacts ZIP file

You can use a script to upload custom artifacts, such as screenshots, to `$CM_EXPORT_DIR` and include them in the build artifacts ZIP file generated by Codemagic.

For example, in a [codemagic.yaml script](../getting-started/yaml/#scripts) step or Flutter workflow editor **post-test** script, use this command to copy build screenshots to `$CM_EXPORT_DIR` to be exported:


```yaml

  scripts:
    - name: Copy custom artifacts
      script: | 
        #!/usr/bin/env sh
        cp  -r build/screenshots $CM_EXPORT_DIR/screenshots

```
