GP SoftwareTwitter
Opus FAQsManualCommandsObjects

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.

Usage:

  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 .\
Delete FILE={$ChildPath} NORECYCLE SKIPNOTEMPTY QUIET
<?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>
	<icon1>#opentoolbar</icon1>
	<function type="normal">
		<instruction>@set ChildPath={filepath$|noterm}</instruction>
		<instruction>Copy MOVE {$ChildPath}\* TO .\</instruction>
		<instruction>Delete FILE={$ChildPath} NORECYCLE SKIPNOTEMPTY QUIET</instruction>
	</function>
</button>
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:

@nofilenamequoting
@dirsonly
Copy MOVE FILE="{filepath$}*" HERE
Delete FILE="{filepath$}" NORECYCLE SKIPNOTEMPTY QUIET
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:

"D:\Tools\SysinternalsSuite\dowloads"