# Copy files to multiple folders

**URL:** https://resource.dopus.com/t/copy-files-to-multiple-folders/50925
**Category:** Help & Support
**Tags:** commands
**Created:** [May 24, 2024, 5:10pm UTC](https://resource.dopus.com/t/copy-files-to-multiple-folders/50925 "2024-05-24T17:10:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rafaelsouzams](https://resource.dopus.com/user_avatar/resource.dopus.com/rafaelsouzams/32/49282_2.png) [@rafaelsouzams](https://resource.dopus.com/u/rafaelsouzams)
#### Post date: [May 24, 2024, 5:10pm UTC](https://resource.dopus.com/t/copy-files-to-multiple-folders/50925/1 "2024-05-24T17:10:31Z")

</div>

Can you tell me if I can make a copy of a file within the dOpus and place it in several folders at the same time?

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [May 24, 2024, 7:17pm UTC](https://resource.dopus.com/t/copy-files-to-multiple-folders/50925/2 "2024-05-24T19:17:50Z")

</div>

Might be what you need:

> [@Copy into multiple selected destinations](https://resource.dopus.com/t/copy-into-multiple-selected-destinations/24570):
>
> Overview: This script-button copies the selection from the source side in to each selected folder on the destination side. Before clicking the button: [image] After clicking the button: [image] Download: If you download button in .dcf format, yo…

---

<div class="post-metadata">

### Author: ![galaxyhub](https://resource.dopus.com/user_avatar/resource.dopus.com/galaxyhub/32/42793_2.png) [@galaxyhub](https://resource.dopus.com/u/galaxyhub)
#### Post date: [May 25, 2024, 2:28am UTC](https://resource.dopus.com/t/copy-files-to-multiple-folders/50925/3 "2024-05-25T02:28:11Z")

</div>

Make a **User Command** like so

 ![image](https://resource.dopus.com/uploads/default/original/3X/5/8/58bb678b3efc59a33030a0034683f7052efb7df4.png)

here is the code to copy and paste

```javascript
function OnClick(clickData)
{
	var cmd = clickData.func.command;
	for (var eSel = new Enumerator(clickData.func.sourcetab.selected_dirs); !eSel.atEnd(); eSel.moveNext())
	{
		cmd.ClearFiles();
		cmd.AddFile(eSel.item());
		cmd.RunCommand("Clipboard PASTE USESEL");
	}
}

```

then make a button up with the command  
`PastePlus`

select multiple folders and click button to copy to them
