Why Delete code doesn't works now

I had a button with this code

@set ChildPath={sourcepath$|noterm}
Copy MOVE * TO ..
Go ..
Delete {$ChildPath} FAILNOTEMPTY NORECYCLE QUIET

What it's does?
It's Move All Item 1 Level UP and Delete that Original Folder

Now the Delete part doesn't works. I mean all Item move 1 level up but the original folder doesn't Delete.

Does it work on local drives but not work on a NAS, or similar? Or is it not working everywhere?

I Just Tried on Local disk and it's not work

Is anything still in the folder (including files that might normally be hidden, like desktop.ini)?

Can the folder be deleted manually?

NO NOTHING left on that folder, no hidden file, no desktop.ini

YES that folder can deleted manually without any problem via the delete button on the toolbar or press the delete key on the keyboard.

I have this button (I think it's coming from this very forum, maybe even posted by you @Leo).
I've just tested it (in Opus 13.10.4), and it's working.
First test gave me a progress popup in status bar that took a few seconds telling it was trying to delete one of the files that it had just moved up, but it ended up closing it.
Subsequent tries : popup hidden in status bar flashes, but all goes well.

Most likely something has the directory locked the first time the delete is tried. Since QUIET is specified, you won't see an error message.

That might happen if e.g. a background thread (or another process) is still extracting information from one of the files in the folder when the delete happens.

OK now I remove the QUIET and See that Error message.


How to Solve That @Leo

That's not an error message, it's a confirmation dialog asking you to make sure you want to proceed.

But The Delete Button on that Message box doesn't Work. I Click that Delete Button then nothing happen, The Target Folder doesn't Delete.

What is the filter definition?

I Don't know Which Filter makes that issue.

You might have turned it on accidentally:

No Dear @lxp That Filter was not enable, Now I have tried out with turned it ON and OFF But No Effect with the Buttons work. Nothing has been changed with turned it ON and OFF the Delete Filter. By the way this is Delete filter code on my PC

Set DELFILTER=Toggle

Not at a PC right now to double check, but I think FAILNOTEMPTY also counts as a filter here, since it can change which directories get deleted.

Where can I found The FAILNOTEMPTY Filter? OR How can I disable that FAILNOTEMPTY Filter

"as a filter"


BTW: The original versions use SKIPNOTEMPTY:

1 Like

Thank you so much @lxp now I Replace all the code with the original one and now its works no issue.

The Original Code is:

<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
	<label>Delete Folder and move contents up</label>
	<icon1>#opentoolbar</icon1>
	<function type="normal">
		<instruction>@set ChildPath={sourcepath$|noterm}</instruction>
		<instruction>Copy MOVE * TO ..</instruction>
		<instruction>Go ..</instruction>
		<instruction>Delete FILE=&quot;{$ChildPath}&quot; NORECYCLE SKIPNOTEMPTY QUIET</instruction>
	</function>
</button>