Copy move createfolder: to copy multiple files into 1 folder named after the 1st file name

I have the following in the context menu:

Copy MOVE CREATEFOLDER "{dlgstringS|Name of Folder to move to...|{file$|noext}}"

This is fine for a single file.

When I wish to copy multiple files that way, it will obviously ask for each file.

I would like to select a number of files, use an adjusted menu to move them into a single folder named after the first one that I can (preferably) first edit before proceeding.

Example - files are like

Calendar - Versions 52-000.jpg
Calendar - Versions 52-001.jpg
Calendar - Versions 52-002.jpg
Calendar - Versions 52-003.jpg

etc.

I select those, then use a command that asks for the filename that takes the 1st name 'as a base' - I would then remove the trailing part (52-000) and click OK to have the files stored in a folder named
'Calendar - Versions'

Right now I select the first file, hit F2, select 'Calendar - Versions', copy to clipboard
then use

dopusrt /CMD Copy MOVE TO HERE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...: {d}|{d}}" 

and paste the text.

Any suggestions?

Thanks!

Try this:

@set name {dlgstringS|Name of Folder to move to...|{file$|noext}}
Copy MOVE CREATEFOLDER "{$name}"

Wow!
This is perfect, thank you so much.

This is really time saver - should have asked earlier...

Thanks again!

If I select folders and run this command, prompt alert says that is not possible to move folder into itself.

image

Is it possible to keep skip this alert ? I try WHENEXISTS=skip without success.

You want it to skip all folders, or something else?

Oups... Skip not keep... so skip this prompt

You could add @filesonly to the button so it skips all folders.

Yes but I want to move folders too...
So it's not possible to skip this alert ?

I added a drop-down list of filenames.
Quick buttons for directory organisation - Buttons/Scripts - Directory Opus Resource Centre (dopus.com)

Move them where? The error happens if they're being moved in an invalid way, so skipping it will be the same as skipping the folders themselves. (Depending on what the destination is, of course.)

FWIW - I've set it up this way

ignore the 'extra' about changing the date stamp after newest file in folder.

Here my example...

I understand that is not possible to move folder into itself, so I ask if it's possible to skip this error message but move others folders and files selected to it...

Either deselect the folder before copying or copy everything into a temp folder and rename or copy that folder in a second step.

Scripting, I have updated all to v1.6.1.