> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-integration/3.0/troubleshooting-and-resources/ci-articles-and-faqs/articles/trimming-parent-folder-name-while-uploading-files-to-s3.md).

# Trim parent folder name when uploading to S3

### Problem <a href="#problem" id="problem"></a>

With the [Upload Artifacts to S3 step](/continuous-integration/use-harness-ci/use-harness-ci/build-and-upload-artifacts/upload-artifacts/upload-artifacts-to-s3.md), the default behavior retains the parent folder name in file paths. However, there may be situations where you want to remove the parent folder name from the file path during the upload process.

### Solution <a href="#solution" id="solution"></a>

To trim the parent folder name when uploading files to S3, a [stage variable](/harness-ai/use-harness-platform/pipelines/add-a-stage.md#stage-variables) named `PLUGIN_STRIP_PREFIX` to your deployment template or configuration. Set the value to the name of the parent folder that you want to eliminate from the file paths.

This variable specifies the parent folder name that needs to be removed from the file paths during the upload process. For example, assume you are uploading files with the following file structure:

```
Parent_Folder
  └── Child_Folder
      └── File.txt
```

If you want to remove the `Parent_Folder` name from the file paths during upload, set `PLUGIN_STRIP_PREFIX` to `Parent_Folder`.
