# Copy the path of all tabs

**URL:** <https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805>\
**Category:** Help & Support\
**Created:** [July 26, 2022, 12:04pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805 "2022-07-26T12:04:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![skinz](https://resource.dopus.com/user_avatar/resource.dopus.com/skinz/32/42589_2.png) [@skinz](https://resource.dopus.com/u/skinz)\
**Post date:** [July 26, 2022, 12:04pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/1 "2022-07-26T12:04:24Z")

</div>

In Dopus there is a button for copy folder path (Edit-Copy Others-Folder Path), but it only for current tab. Is it possible to have a button to copy the path of all open tabs in a lister? My goal is to make it easy to connect between Dopus and open/save as dialog using windows 10 clipboard history without a 3rd app.

Copy the path of all open tabs in a lister...

 ![2022-07-26_184718](https://resource.dopus.com/uploads/default/original/3X/6/4/64b878dd2bd0c864905ffb4d85943bcdc42d074a.png)

Paste using clipboard history Windows 10 (Win+V)...

 ![2022-07-26_185303](https://resource.dopus.com/uploads/default/original/3X/6/b/6bdcb7434f12923a396c35d5ce34eb80fa8ba301.png)

---

<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:** [July 26, 2022, 12:44pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/2 "2022-07-26T12:44:53Z")

</div>

Can be done with a small script:

```javascript
function OnClick(clickData)
{
	var lister = clickData.func.sourcetab.lister;
	var fsu = DOpus.FSUtil;
	var clip = "";
	for (var eTabs = new Enumerator(lister.tabs); !eTabs.atEnd(); eTabs.moveNext())
	{
		var path = fsu.Resolve(eTabs.item().path);
		clip += path + "\n";
	}
	DOpus.SetClip(clip);
}

```

---

<div class="post-metadata">

**Author:** ![skinz](https://resource.dopus.com/user_avatar/resource.dopus.com/skinz/32/42589_2.png) [@skinz](https://resource.dopus.com/u/skinz)\
**Post date:** [July 26, 2022, 1:02pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/3 "2022-07-26T13:02:13Z")

</div>

Thank you for the reply. The script does not separate each path in the clipboard history but merges them into one.

![2022-07-26_195638](https://resource.dopus.com/uploads/default/original/3X/e/5/e56cdad4afaecca89f4a13d69a88e3e0b0bbdeaf.png)

---

<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:** [July 26, 2022, 1:06pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/4 "2022-07-26T13:06:43Z")

</div>

```javascript
function OnClick(clickData)
{
	var lister = clickData.func.sourcetab.lister;
	var fsu = DOpus.FSUtil;
	for (var eTabs = new Enumerator(lister.tabs); !eTabs.atEnd(); eTabs.moveNext())
	{
		var path = fsu.Resolve(eTabs.item().path);
		DOpus.SetClip(path);
	}
}

```

---

<div class="post-metadata">

**Author:** ![skinz](https://resource.dopus.com/user_avatar/resource.dopus.com/skinz/32/42589_2.png) [@skinz](https://resource.dopus.com/u/skinz)\
**Post date:** [July 26, 2022, 1:14pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/5 "2022-07-26T13:14:47Z")

</div>

The last script still doesn't work as expected.

The script...

 ![2022-07-26_200947](https://resource.dopus.com/uploads/default/original/3X/4/d/4d91ee6e5607d465005c7fe6aad544d325cc52ca.png)

The result...  
 ![2022-07-26_201026](https://resource.dopus.com/uploads/default/original/3X/e/3/e3884735ba817a725db37e69163a4cd2e9f172f9.png)

---

<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:** [July 26, 2022, 1:26pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/6 "2022-07-26T13:26:13Z")

</div>

It's possible the Windows clipboard history tool ignores rapid changes and only keeps the last one. I don't know how it works. You could try adding a delay between each path but that could make the thing quite slow. Maybe you're better off using one of the proper tools for this instead of trying to do it through the clipboard.

---

<div class="post-metadata">

**Author:** ![skinz](https://resource.dopus.com/user_avatar/resource.dopus.com/skinz/32/42589_2.png) [@skinz](https://resource.dopus.com/u/skinz)\
**Post date:** [July 26, 2022, 1:36pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/7 "2022-07-26T13:36:26Z")

</div>

Ah, too bad. I think I need to find a 3rd app for this task or do it manually. Thank you very much for your reply, Leo.

---

<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:** [July 26, 2022, 1:44pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/8 "2022-07-26T13:44:33Z")

</div>

It's the kind of thing that Quick Access Popup and the other tools mentioned in [Can Opus replace the File Open/Save dialogs other programs use?](https://resource.dopus.com/t/can-opus-replace-the-file-open-save-dialogs-other-programs-use/36127) should make very easy.

---

<div class="post-metadata">

**Author:** ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)\
**Post date:** [July 26, 2022, 1:58pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/9 "2022-07-26T13:58:09Z")

</div>

> [@Leo](#):
>
> You could try adding a delay between each path but that could make the thing quite slow.

A delay of 250 ms should be enough.

```javascript
DOpus.Delay(250);

```

---

<div class="post-metadata">

**Author:** ![skinz](https://resource.dopus.com/user_avatar/resource.dopus.com/skinz/32/42589_2.png) [@skinz](https://resource.dopus.com/u/skinz)\
**Post date:** [July 26, 2022, 2:25pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/10 "2022-07-26T14:25:15Z")

</div>

Thank for your reply lxp, but I have no idea where to put "DOpus.Delay(250);" in the script or which line should I change.

---

<div class="post-metadata">

**Author:** ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)\
**Post date:** [July 26, 2022, 2:59pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/11 "2022-07-26T14:59:41Z")

</div>

Insert a new line after `DOpus.SetClip(path);`.

```javascript
function OnClick(clickData)
{
	var lister = clickData.func.sourcetab.lister;
	var fsu = DOpus.FSUtil;
	for (var eTabs = new Enumerator(lister.tabs); !eTabs.atEnd(); eTabs.moveNext())
	{
		var path = fsu.Resolve(eTabs.item().path);
		DOpus.SetClip(path);
        DOpus.Delay(250);
	}
}

```

---

<div class="post-metadata">

**Author:** ![skinz](https://resource.dopus.com/user_avatar/resource.dopus.com/skinz/32/42589_2.png) [@skinz](https://resource.dopus.com/u/skinz)\
**Post date:** [July 26, 2022, 3:16pm UTC](https://resource.dopus.com/t/copy-the-path-of-all-tabs/41805/12 "2022-07-26T15:16:54Z")

</div>

Yes, insert a new line after `DOpus.SetClip(path);` works as expected. Many many thanks for your help, lxp. This helps me a lot. And thanks a lot for the script too, Leo.

 ![2022-07-26_220519](https://resource.dopus.com/uploads/default/original/3X/a/e/ae875654daac1289b5684969e490968922307611.png)

The result is in the clipboard history...  
 ![2022-07-26_220559](https://resource.dopus.com/uploads/default/original/3X/b/c/bc73f3cabd805cb96563b38fdc72a158ee3ee4c2.png)

Again, thanks a lot.
