Button to copy and record new name

What would be the process of making a button that would copy a folder to a specific location, than once copied to that location use the "Clipboard COPYNAMES" to copy its new location at the same time. Thanks

@nofilenamequoting Copy Clipboard SET {destpath}{file}

So if the directory I want to copy to is D:\Temp would it be

@nofilenamequoting
Copy TO "D:\Temp"
Clipboard SET {destpath}{file}

Or maybe without the quotes. I may have not been clear that I have the location I want to copy to in mind already. I want the Copy and Paste done in one step. Thanks

If the path is fixed then you'd use that fixed path instead of {destpath}.

Yes without the quotes it works. My mistake though, I want the full path. So I need to modify the {file} or something correct. The current just give the filename I want the copied to path as well, like D:\Temp\myFile.png

@nofilenamequoting
Copy TO D:\Temp
Clipboard SET {destpath}{filepath}

With that path (D:\Temp), should work with or without the quotes, I think.

I don't think @nofilenamequoting means there should be no quotes. I think it means that Opus won't supply quotes. They have to be specified as needed, but they are not needed in your case since the path doesn't contain any blanks.

You probably want

Copy TO D:\Temp
Clipboard SET D:\Temp{file}

If you actually have a more complicated path, you may want

@nofilenamequoting
Copy TO "more complicated path"
Clipboard SET "more complicated path{file}"

You still want @nofilenamequoting because {file} itself may contain spaces and cause quotes to be inserted if they are not prevented. You (presumably) don't want quotes in the string that's put in the clipboard.

@nofilenamequoting Copy TO D:\Temp Clipboard SET D:\Temp\{file}

Thanks guys this is pretty much what I wanted. I need to understand the switches more, but when I use the @nofilenamequoting the string after the Opus code and switch does not show up (in my case I don't see the "\index.html" ). I changed it so I don't have to navigate up to the folder I need to copy. The folder I am always copying is index.html.

Copy {sourcepath|noterm} TO D:\Temp Clipboard SET D:\Temp\{sourcepath|nopath}\index.htmlthe above does exactly what I want. Thanks!

What I actually mean is that I copy the folder, and the path I need to paste via text is to the index.html in that folder every time. Thanks

@nofilenamequoting Copy TO D:\Temp Clipboard SET D:\Temp\{file}\index.html

Also... looking at the other helpful post, I have created this and it helps a lot.

@set name {dlgstring|Specify folder-name to create and COPY files to...} Copy {sourcepath|noterm} TO {$name} Clipboard SET {$name}\{sourcepath|nopath}\index.html
It lets me set the name of the Directory instead of hard coding it like the previous one I needed. My question is if the directory does not exist can I let Opus let Windows create it, or does it have to exist already? Thanks

I guess I would need some type of logic that says IF NOT {$name} than create it.

This seems to work pretty good. Cant see any problems, but still testing...

@set name {dlgstring|Specify folder-name to create and COPY files to...} CreateFolder "{$name}" Copy {sourcepath|noterm} TO {$name} Clipboard SET {$name}\{sourcepath|nopath}\index.html

That's very different to what we were talking about originally.

It's best to say exactly what you want at the start of the thread, not to drip-feed details & changes as each solution is provided, as the intermediate solutions may not be the best way to achieve the different thing you really wanted (and it's a waste of everyone's time).

I'm no longer sure what the aim is, and I'm not sure what the button code is meant to do from looking at it.

Terribly sorry, no intention to waste anybody's time. I wandered if I should start "what else" this helped me with in other thread. I did not see how it could confuse those helping me, so I just stated what else I discovered, with what you helped me with. From now on I will start in different thread even if it is somewhat similar. I hoped to just provide what else I was able to achieve and some advice on best practices. Thanks

To be clear I just wanted to show what it helped me understand, and figured if what I was doing was not the best way the great support here would advice. Thanks