Is there a Copy To... that will create a folder?

Not sure if this is an involved macro or whether it's even doable, but I would like to copy the selected files to a new folder. I want a prompt for the absolute (or relative) folder name and have it create the folder and copy the files to that folder.

Ditto for MOVE To...

Thanks

Randy

The exact syntax you'll need for the command will depend on just HOW you'll want to use it...

For instance, here is what I use as context menu items that I click after doing a drag and drop with the Right Mouse Button (RMB):

Copy:

dopusrt /cmd Copy HERE CREATEFOLDER "{Rs|COPY to new folder...|{d}}"

Move:

dopusrt /cmd Copy MOVE HERE CREATEFOLDER "{Rs|MOVE to new folder...|{d}}"

Whereas the commands I use bound to hotkeys (when I'm only wantint to copy/move files to a new folder in my "current" directory) are slightly different:

Copy:

dopusrt /cmd Copy HERE CREATEFOLDER "{Rs|COPY to new folder...|{s}}"

Move:

dopusrt /cmd Copy MOVE HERE CREATEFOLDER "{Rs|MOVE to new folder...|{s}}"

What I like about these commands (where others on the forums here might suggest 'other' ways of doing this same thing, one of which might be more to your liking...) is that using the dopusrt /cmd command prefix along with the {Rs} stuff at the end allows for prompting me with just one dialog box no matter how many files/folders I've selected for copying... and I get to see the path where I'll ask the new folder to be created IN the dialog itself... which is nice if I'm dragging to 'destination' folder in the folder tree as the tree likes to skip around sometimes if you're down by the bottom, and sometimes I release the mouse button an unintended folder. This way... I see in the dialog prompt that the path is not what I intended, and maybe rather than "cancelling" it I just backspace over the wrong folder name in the dialog, correct it, and append my "new" folder name and move along.

The reason I have the "hotkey" based commands a little different (they use {s} at the end which is the "sourcepath"/current directory... is that I only ever use the hotkey to copy/move within the 'current' directory... That said... because of the way the context drop menu actions are written, they work regardless of whether I drag and drop to the same/current folder... or to a different destination folder.

Play around, and reply back to how you'd best like to use this... if you'd rather have a Toolbar button, etc etc... or if you need a hand figuring out where to input the commands...

Wow. Awesome answer.

I'll plug these in and give them a spin. Glad I'm not the only one who wanted to copy to a directory that didn't yet exist :wink:

Thanks

Randy

I must be doing something basic wrong.

I created a new command and pasted in the full line:

dopusrt /cmd Copy HERE CREATEFOLDER "{Rs|COPY to new folder...|{s}}"

And bound it to a button on the toolbar. When I select some files and press the button, I get the prompt as you describe, append the new folder name and press OK....and nothing happens.

This is supposed to be Function: "Standard Function (Opus or external)", right?

Randy

I just tried this and used the exact line you used - it worked fine.

You must have done something wrong with the button creation.

Copy and Paste the following code onto your toolbar while in customize mode:

<?xml version="1.0"?> <button backcol="none" display="both" textcol="none"> <label>New Copy</label> <icon1>#copy</icon1> <function type="normal"> <instruction>dopusrt /cmd Copy HERE CREATEFOLDER &quot;{Rs|COPY to new folder...|{s}}&quot;</instruction> </function> </button>

Um, you can paste raw XML into the scripter window? It says to me it doesn't recognize <?xml>

Randy

No - you paste the xml onto the toolbar whilst in customize mode as I said in my post.

[quote="RMagruder"]Um, you can paste raw XML into the scripter window? It says to me it doesn't recognize <?xml>

Randy[/quote]

[How to use buttons and scripts from this forum)