# Archive single file without dialog with name of zip file matching first word of file

**URL:** <https://resource.dopus.com/t/archive-single-file-without-dialog-with-name-of-zip-file-matching-first-word-of-file/53387>\
**Category:** Help & Support\
**Created:** [November 8, 2024, 6:44pm UTC](https://resource.dopus.com/t/archive-single-file-without-dialog-with-name-of-zip-file-matching-first-word-of-file/53387 "2024-11-08T18:44:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![entenna](https://resource.dopus.com/letter_avatar_proxy/v4/letter/e/bc8723/32.png) [@entenna](https://resource.dopus.com/u/entenna)\
**Post date:** [November 8, 2024, 6:44pm UTC](https://resource.dopus.com/t/archive-single-file-without-dialog-with-name-of-zip-file-matching-first-word-of-file/53387/1 "2024-11-08T18:44:56Z")

</div>

Hi, I need a script of a custom archive button that will

1. archive just a single file (selected); keep the original file, don't delete it.
2. does not have a dialog
3. names the zip archive based on the first word of the file (until the first space)

For instance, a sample file 'R4-2412211 Test Conditions.docx' should be archived to 'R4-2412211.zip'

---

<div class="post-metadata">

**Author:** ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)\
**Post date:** [November 8, 2024, 7:37pm UTC](https://resource.dopus.com/t/archive-single-file-without-dialog-with-name-of-zip-file-matching-first-word-of-file/53387/2 "2024-11-08T19:37:29Z")

</div>

```plaintext
@nodeselect
Copy HERE ARCHIVE CREATEFOLDER="{=RegEx(file, "(.*?) .*", "\1")=}"

```

---

<div class="post-metadata">

**Author:** ![entenna](https://resource.dopus.com/letter_avatar_proxy/v4/letter/e/bc8723/32.png) [@entenna](https://resource.dopus.com/u/entenna)\
**Post date:** [November 8, 2024, 9:26pm UTC](https://resource.dopus.com/t/archive-single-file-without-dialog-with-name-of-zip-file-matching-first-word-of-file/53387/3 "2024-11-08T21:26:12Z")

</div>

Excellent, works beautifully
