Create new folder's name starting from selected file/folder

Right now, I'm using this function, which I found here on the forum, to create a new folder based on the selected file's name:

CreateFolder NAME {O!|noext}

It works for selected files, but how to achieve something similar with a selected folder?

What I'm trying to do is have a selected folder, and via shortcut, getting the new folder prompt with the name of the selected folder already filled in the new folder's field name.

Works universally:

CreateFolder NAME={file|noext} ASK
2 Likes

Awesome, thanks!