Custom Button for Re-naming a shortcut link after PASTELINK

Hi, I'm a fairly new user seeking help with this script for a custom button. I'd like to rename a shortcut folder to include the user-added project name string along with the existing link name, which currently contains the job number.

For example, when the button is clicked, it should add a shortcut link to the specified folder. The existing folder name resembles '22-09-071', and I want the user to append a descriptive string like 'WEDGEFIELD'. The desired result is to rename the shortcut link to look like this: '22-09-071_WEDGEFIELD'.

Here is my current script that works up to adding the new shortcut link to the folder - I just need help with the renaming/appending process. Thanks for any help:

@set ProjectName {dlgstring|Enter Project Name:}
Clipboard COPY
Go PATH="S:\USERS\DOUG\2. AREAS\QUICK ACCESS SHORTCUTS\1. PROJECTS"
Clipboard PASTELINK

Hi MadMax - and welcome to the wonderful world of DOpus! :smiley:

I'm not absolutely sure I understand what is to be renamed, but perhaps this button will help:

@set ProjectName {dlgstring|Enter Project Name:}
@set OldName "22-09-071"
Rename FROM {$OldName} TO {$OldName}_{$ProjectName}

You'd probably need a second dialog for entering the old name you want to change.

You can do it all in one line, without changing folders or overwriting the clipboard:

Copy MAKELINK TO="S:\USERS\DOUG\2. AREAS\QUICK ACCESS SHORTCUTS\1. PROJECTS" PATTERN * AS "*_{dlgstring|Enter project name:}"

Thanks, That worked great!