Improving a popup to add suffix to filenames

I have a hotkey which I use all the time.
With 1 or more files highlighted I strike the hotkey
A popup appears with a text field and the cursor is in the text field so I dont have to click/select.
I enter my ((text)) and it is added to the selected filenames as a suffix.
I don't suppose I can have the ((entered text)) added to the clipboard at the same time?
It would seem to me that would require a variable and so require scripting?
Thank you for any responses

rename PATTERN (.*)(\..*) TO "\1 {dlgstring|SuffiXXX}\2" REGEXP

Try this

@set SuffiXXX={dlgstring|SuffiXXX}
rename PATTERN (.*)(\..*) TO "\1 {$SuffiXXX}\2" REGEXP
Clipboard SET {$SuffiXXX}
1 Like

You can also use IGNOREEXT to simplify the Rename part, and make it work with files & folders that don't have . in their names:

@set SuffiXXX={dlgstring|SuffiXXX}
rename IGNOREEXT PATTERN * TO "* {$SuffiXXX}"
Clipboard SET {$SuffiXXX}

@Ixp - Perfect! Thank you. Worked first time. Now I know variables are available in non scripted solutions. Thank you...

@Leo - Wow thank you! I spent a long time and gave up on getting this button to work on folders. Should have just asked you :slight_smile:

Gentlemen. Gratitude..... you make my life easier!

2 Likes