Create Folder while copy/move?

[quote="yaramorgan"]@runonce:@set dirname={dlgstringS|Enter Folder Name|}
@set clipcontent={clip}
CREATEFOLDER="{$dirname}" READAUTO
Copy MOVE="{$clipcontent}" TO="{$dirname}"[/quote]

{clip} is for inserting strings from the clipboard into commands. It's not for pasting files. When a file is put into the clipboard it's in a special format which isn't just a string. (Actually, one of several special formats. Which format is used depends on the program that put the data into the clipboard.)

You're also not running the CreateFolder command, you're running a non-existent command called CreateFolder=xyz (where xyz is whatever is typed into the prompt).

(There is also a CreateFolder argument to the Copy command, that lets you create folders when you copy files. I think that's where your confusion came from.)

BTW, there is no need to use @runonce with @set. The @set command is always only run once (else it wouldn't be useful, since it's reason to exist is to capture a value which can then be reused).

Anyway, what you want to do can be simplified into this:

CreateFolder READAUTO NAME="{dlgstringS|Enter Folder Name}" Clipboard PASTE

Oh, by the way, based on other codes provided here the matter has been solved already.

Action: Create Filenamed Folder to MOVE to...
dopusrt /cmd Copy MOVE TO HERE CREATEFOLDER "{dlgstring|Specify folder-name to MOVE items to...: {d}|{d}}"

Action: Create Filenamed Folder to COPY to...
dopusrt /cmd Copy TO HERE CREATEFOLDER "{dlgstring|Specify folder-name to COPY items to...: {d}|{d}}"

thanks

@ Leo - Thanks for correcting my garbled code! The button works great (I'll have to fiddle with it a bit so that after the folder creation and the paste, the lister doesn't automatically go inside the created folder, but just stays at the parent).

@ Mrwul - Thanks for posting those buttons, I hadn't come across them before. However, I was looking to create the folder directly in the source lister. In your button examples, the user is prompted for a location where to create the folder before performing the paste, rather than automatically creating the folder in the source lister (having navigated to my preferred location via Opus lister) and then pasting all in one swoop. This is what Leo's button example does. But I think I'll use both types for different situations, so thanks again for posting :slight_smile: