Command for prepending a text to file name trims spaces

I'm trying to make a command to prepend entered text to selected files and folders. The problem is if I enter "something " (with a space at the ending), the space is trimmed. How can I fix this? I know that I could modify the command and change "{$text}*" to "{$text} *" but I don't want to always add the space. Just when I type it.

@Set text={dlgstring|Prepend text} Rename PATTERN "*" TO "{$text}*"