# Paste Filename On Hotkey

**URL:** <https://resource.dopus.com/t/paste-filename-on-hotkey/58887>\
**Category:** Help & Support\
**Created:** [March 18, 2026, 11:30pm UTC](https://resource.dopus.com/t/paste-filename-on-hotkey/58887 "2026-03-18T23:30:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASUNDER](https://resource.dopus.com/user_avatar/resource.dopus.com/asunder/32/59834_2.png) [@ASUNDER](https://resource.dopus.com/u/ASUNDER)\
**Post date:** [March 18, 2026, 11:30pm UTC](https://resource.dopus.com/t/paste-filename-on-hotkey/58887/1 "2026-03-18T23:30:34Z")

</div>

I want to copy filenames to the clipboard and then use a single hotkey to invoke inline rename, then paste from the clipboard in the same macro.

This isn’t working for me:  
Rename PATTERN="\*_" TO="{clip}_" AUTORENAME

It just adds onto the name instead of renaming it. ?  
And for some reason when I copy the code onto this forum it keeps removing the star in the quotes.

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [March 19, 2026, 12:04am UTC](https://resource.dopus.com/t/paste-filename-on-hotkey/58887/2 "2026-03-19T00:04:30Z")

</div>

> [@ASUNDER](#):
>
> And for some reason when I copy the code onto this forum it keeps removing the star in the quotes.

When you are typing a post, above the box you type into is a link: [Editing & Formatting Tips](https://resource.dopus.com/t/formatting-tips-specific-to-the-opus-forum/24899/1) - That explains how to post code blocks which avoid the problem (among other benefits), as well as how to get a \* outside of code blocks if it's needed.

> [@ASUNDER](#):
>
> Rename PATTERN="_" TO="{clip}_" AUTORENAME

That would rename the selected files to what's in the clipboard, without displaying any prompt first.

I'm not sure if there is a way to do what you want using inline rename, but you could have a small dialog box pop-up to let you edit the name, using `{dlgstring|Enter name|{clip}}` or similar.

Or, better, use `{clip|cleanfilename}` to make what's in the clipboard OK for filenames, i.e.

```plan
{dlgstring|Enter name|{clip|cleanfilename}}

```

(You can still run into problems with clipboard text containing `}`, which is allowed in filenames. A script could do this in a better way if expect that to be an issue.)

- [Rename [Directory Opus Manual]](https://docs.dopus.com/doku.php?id=reference:command_reference:internal_commands:rename)
- [Codes to display dialogs [Directory Opus Manual]](https://docs.dopus.com/doku.php?id=reference:command_reference:external_control_codes:codes_to_display_dialogs)
- [Codes for clipboard and variables [Directory Opus Manual]](https://docs.dopus.com/doku.php?id=reference:command_reference:external_control_codes:codes_for_clipboard_and_variables)

---

<div class="post-metadata">

**Author:** ![ASUNDER](https://resource.dopus.com/user_avatar/resource.dopus.com/asunder/32/59834_2.png) [@ASUNDER](https://resource.dopus.com/u/ASUNDER)\
**Post date:** [March 19, 2026, 1:00am UTC](https://resource.dopus.com/t/paste-filename-on-hotkey/58887/3 "2026-03-19T01:00:51Z")

</div>

```auto
my bad

```

For the pasting I could just leave it as is, doing the inline rename hotkey first, then Ctrl + V.

---

<div class="post-metadata">

**Author:** ![ASUNDER](https://resource.dopus.com/user_avatar/resource.dopus.com/asunder/32/59834_2.png) [@ASUNDER](https://resource.dopus.com/u/ASUNDER)\
**Post date:** [March 19, 2026, 7:41pm UTC](https://resource.dopus.com/t/paste-filename-on-hotkey/58887/4 "2026-03-19T19:41:20Z")

</div>

Actually I ran into this problem because I was still trying to figure out a way to divide copy/paste between files and text. I tried to add Shift to the Ctrl + C and V, to copy and paste text only. So that if I’ve copied a filename or something like that, then it doesn’t matter if I’ve copied files, it won’t overwrite that text. I still haven’t been able to do this.
