# Button for: Extract all files from folder

**URL:** <https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199>\
**Category:** Help & Support\
**Created:** [June 13, 2011, 1:07pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199 "2011-06-13T13:07:43Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Speed](https://resource.dopus.com/letter_avatar_proxy/v4/letter/m/a88e57/32.png) [@Mr\_Speed](https://resource.dopus.com/u/Mr_Speed)\
**Post date:** [June 13, 2011, 1:07pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/1 "2011-06-13T13:07:43Z")

</div>

Hi,

I need a button, that extracts all files from a folder. After that the empty folder should be deleted.

---

<div class="post-metadata">

**Author:** ![abr](https://resource.dopus.com/user_avatar/resource.dopus.com/abr/32/62448_2.png) [@abr](https://resource.dopus.com/u/abr)\
**Post date:** [June 13, 2011, 1:13pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/2 "2011-06-13T13:13:18Z")

</div>

This button does possibly what you´re looking for, please try it in a test folder first:

`<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
	<label>&amp;3 - Move Up Dir &amp;&amp; Del </label>
	<icon1>#DOpusVista:opentoolbar</icon1>
	<function type="batch">
		<instruction>@set ChildPath={sourcepath$|noterm}</instruction>
		<instruction>@runmode hide</instruction>
		<instruction>Copy MOVE * TO ..</instruction>
		<instruction>Go ..</instruction>
		<instruction>@keydown:shift</instruction>
		<instruction>@keydown:none</instruction>
		<instruction>rmdir {$ChildPath}</instruction>
	</function>
</button>
`

From: [url][Moving files around via context menus](https://resource.dopus.com/t/moving-files-around-via-context-menus/8824/1)]

---

<div class="post-metadata">

**Author:** ![Mr\_Speed](https://resource.dopus.com/letter_avatar_proxy/v4/letter/m/a88e57/32.png) [@Mr\_Speed](https://resource.dopus.com/u/Mr_Speed)\
**Post date:** [June 13, 2011, 1:20pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/3 "2011-06-13T13:20:38Z")

</div>

Thx 🙂

---

<div class="post-metadata">

**Author:** ![Mr\_Speed](https://resource.dopus.com/letter_avatar_proxy/v4/letter/m/a88e57/32.png) [@Mr\_Speed](https://resource.dopus.com/u/Mr_Speed)\
**Post date:** [June 13, 2011, 1:33pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/4 "2011-06-13T13:33:05Z")

</div>

Tried it but it's not what I mean. It should just extract the stuff at the same place - this one moves all to the upper folder.

---

<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:** [June 13, 2011, 1:42pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/5 "2011-06-13T13:42:23Z")

</div>

> [@Mr Speed](#):
>
> I need a button, that extracts all files from a folder. After that the empty folder should be deleted.

Do you mean extracts all archives below the current folder? Or extracts all files from the current folder, which is an archive? Or?

Extracts them to where?

Why would the folder be empty after extracting files from it? (Do you mean moving files? Extracting usually means there's an archive involved, like a zip file.)

---

<div class="post-metadata">

**Author:** ![Mr\_Speed](https://resource.dopus.com/letter_avatar_proxy/v4/letter/m/a88e57/32.png) [@Mr\_Speed](https://resource.dopus.com/u/Mr_Speed)\
**Post date:** [June 13, 2011, 1:50pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/6 "2011-06-13T13:50:26Z")

</div>

I mean it like the rar-command "extract here". All files from the folder should extract at that place, where the folder is.

---

<div class="post-metadata">

**Author:** ![plunder](https://resource.dopus.com/user_avatar/resource.dopus.com/plunder/32/26121_2.png) [@plunder](https://resource.dopus.com/u/plunder)\
**Post date:** [June 13, 2011, 2:10pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/7 "2011-06-13T14:10:06Z")

</div>

nobody gets what you are talking about. (i dont get it, so i wont bother. but since nobody gets what you are talking about you should try again from scratch and describe and explain in detail, and with examples, what your problem is. good luck.)

---

<div class="post-metadata">

**Author:** ![Mr\_Speed](https://resource.dopus.com/letter_avatar_proxy/v4/letter/m/a88e57/32.png) [@Mr\_Speed](https://resource.dopus.com/u/Mr_Speed)\
**Post date:** [June 13, 2011, 2:21pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/8 "2011-06-13T14:21:13Z")

</div>

OK, last try...  
There is a folder, with files inside.  
I want to get out (move) all files from that folder.  
At that point - there would be the moved files and the now empty folder.  
And because it's empty, nobody needs it anymore, so it can be delete.

---

<div class="post-metadata">

**Author:** ![plunder](https://resource.dopus.com/user_avatar/resource.dopus.com/plunder/32/26121_2.png) [@plunder](https://resource.dopus.com/u/plunder)\
**Post date:** [June 13, 2011, 2:50pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/9 "2011-06-13T14:50:43Z")

</div>

> [@Mr Speed](#):
>
> OK, last try...

No, you win!

i am first, i give up. i still dont get the picture. i'm out.  
just to let you know. 😛

God bless anyway.

---

<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:** [June 13, 2011, 3:16pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/10 "2011-06-13T15:16:23Z")

</div>

The ContentsToCurrentFolder button in the thread abr linked to sounds like what you want.

---

<div class="post-metadata">

**Author:** ![Mr\_Speed](https://resource.dopus.com/letter_avatar_proxy/v4/letter/m/a88e57/32.png) [@Mr\_Speed](https://resource.dopus.com/u/Mr_Speed)\
**Post date:** [June 13, 2011, 4:17pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/11 "2011-06-13T16:17:46Z")

</div>

Yes, that's it! Thanks a lot 🙂

---

<div class="post-metadata">

**Author:** ![penguinaka](https://resource.dopus.com/user_avatar/resource.dopus.com/penguinaka/32/26146_2.png) [@penguinaka](https://resource.dopus.com/u/penguinaka)\
**Post date:** [June 13, 2011, 11:03pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/12 "2011-06-13T23:03:17Z")

</div>

this post cracked me up lolz 😆

---

<div class="post-metadata">

**Author:** ![shawnadam](https://resource.dopus.com/letter_avatar_proxy/v4/letter/s/ecae2f/32.png) [@shawnadam](https://resource.dopus.com/u/shawnadam)\
**Post date:** [November 27, 2011, 3:04am UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/13 "2011-11-27T03:04:08Z")

</div>

I am not sure if posting this is okay here, but there is a free program that will do this from the context menu. It is called 'Suction', and if you point it at a folder it will suck everything out of it folder. You are left with the folder that you sucked, but in that folder is nothing but files.

[suction.en.softonic.com/](http://suction.en.softonic.com/)

---

<div class="post-metadata">

**Author:** ![abr](https://resource.dopus.com/user_avatar/resource.dopus.com/abr/32/62448_2.png) [@abr](https://resource.dopus.com/u/abr)\
**Post date:** [November 27, 2011, 11:48am UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/14 "2011-11-27T11:48:02Z")

</div>

> [@shawnadam](#):
>
> It is called 'Suction', and if you point it at a folder it will suck everything out of it folder. You are left with the folder that you sucked, but in that folder is nothing but files.

Sounds pretty much like the command `COPY MOVE to ..`

which you can easily integrate into your context menu.

---

<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:** [November 27, 2011, 12:55pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/15 "2011-11-27T12:55:02Z")

</div>

The Suction tool sounds different to that. If I understood correctly, it will flatten all files below a directory into the top-level of that directory, and remove all sub-dirs.

A bit like turning on Flat View -\> Mixed (No Folders) in Opus, except that it is done permanently by moving the files around on disk. Also like my own little [DirFlatten](http://www.pretentiousname.com/miscsoft/index.html#DirFlatten) util.

---

<div class="post-metadata">

**Author:** ![abr](https://resource.dopus.com/user_avatar/resource.dopus.com/abr/32/62448_2.png) [@abr](https://resource.dopus.com/u/abr)\
**Post date:** [November 27, 2011, 1:05pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/16 "2011-11-27T13:05:13Z")

</div>

Oh, ok, then it´s more like

`@dirsonly
@nofilenamequoting
Copy MOVE FILE "{filepath$}\*" HERE
Delete QUIET NORECYCLE`

which can be found here: [url][Moving files around via context menus](https://resource.dopus.com/t/moving-files-around-via-context-menus/8824/1)]

---

<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:** [November 27, 2011, 1:31pm UTC](https://resource.dopus.com/t/button-for-extract-all-files-from-folder/11199/17 "2011-11-27T13:31:58Z")

</div>

No, it's not like that either. 🙂 That would not flatten the sub-sub-directories.
