Drag+drop instruction does not work as context menu item?

I have the following as a drag and drop item

@runonce:@set dirname={dlgstringS|Enter name of folder to move selection into|{file$|noext}}
Copy MOVE FILE="{file$}" CREATEFOLDER="{$dirname}" 

Basically it asks for a file name and preloads the first file name. I often use it when moving multiple files about the same subject (file names start with the same first part, rest is different) into the same folder.

Anyway, I wanted to add this as a context menu item. I used the same code, but that does not work, it does not offer the first file name.

Q: do the same instruction work out differently? (drag+drop vs context menu)


That would move the file to a folder in the other file display.

Is that your intention? Or do you want it moved to a sub-folder under where it already is?

Which context menu are you aiming to add it to?

The below are the current steps using drag & drop.
Select a number of files about the same subject (first part of the file names are identical)
perform drag & drop
first file name is offered as destination
I remove the trailing part (or one can add a new file name)
enter and the new folder is created.

I wonder whether this can be done from the context menu.


Just found thread "Command: Create new folder in parent folder (and move files)"
with the following solution

@set NewDir={dlgstring|Parent folder name:|{file$|noext|noterm}}
Copy MOVE TO={filepath$|....} CreateFolder="{$NewDir}"

This is pretty much what I was looking for, except for one thing.
When testing, the 'new folder' is moved/stored in the root of the drive.
Could the above be adjusted in a way that the folder is created in the same sub sub folder where files were?


So you want to:

  • Select some files
  • Click button, it asks for folder name
  • :arrow_right: Files get moved into that folder, below where they started?

If so, a button to do that is in the default toolbars:

It runs this command:


If you need it to work with Flat View or items below Expandable Folders, then you might want something slightly different. But then the question is where do you want the folder(s) relative to the files or top-level path.

This is probably closer to what you want, using the first file name as the default folder name:

@set NewDir={dlgstring|Parent folder name:|{file$|noext|noterm}}

This is the one. Super!
Many, many thanks.

FWIW I did have the Operations Toolbar enabled. After enabling the New Folder did not show the Move to New Folder. But even if, I would then have to enter the new folder name from scratch.
In my case, the last one was exactly what I looking for.

Thanks again.