Explode (deflate) selected folder

This button will 'deflate' a selected folder. It is like unarchiving an archive and subsequently deleting the archive, but with a folder instead.


  1. select a folder with contents
  2. execute this button
  3. everything within the selected folder will be moved into it's parent path (the folder you are in), basically emptying that folder, then it will be deleted
@set ChildPath={filepath$|noterm}
Copy MOVE {$ChildPath}\* TO .\
<?xml version="1.0"?>
<button backcol="none" display="both" separate="yes" textcol="none">
	<label>Explode Folder</label>
	<tip>Move all from selected folder into current path, then delete that folder</tip>
	<function type="normal">
		<instruction>@set ChildPath={filepath$|noterm}</instruction>
		<instruction>Copy MOVE {$ChildPath}\* TO .\</instruction>
		<instruction>Delete FILE={$ChildPath} NORECYCLE SKIPNOTEMPTY QUIET</instruction>
1 Like

I don't know why, but this simply doesn't work for me. I select a folder with pic, hit the button and....nothing. I apologize for my ignorance, but does Dopus have a logging mechanism so I can see what's (not) happening?

Give this a try:

Copy MOVE FILE="{filepath$}*" HERE
1 Like

Could you tell us the full path of the folder, or one, that is similar (with spaces, etc.)?

This worked like a charm. Thanks!

I couldn't get it to work on any folder/subfolder. Here's an example of the last one I tried:


Coming back to this one, is there a particular switch or argument I can use on the button to automatically overwrite existing files? I've attempted to add "MOVEWITHSHIFT" but it doesn't seem to have any effect. I'm still prompted when there's an existing file in the directory being merged.


Yes: WHENEXISTS=replace.


Thank you! I use this button constantly. So "move" is a function of the copy command.