I think the first button is failing because when there are no files the first Delete commands has nothing to work on so it cancels the button.
This seems to work and I think is all you need:
Select All
Delete .
The Select All command there is purely cosmetic and could be removed. It has no effect on what's deleted and is just there to visually highlight all the things about to be deleted, as per your post.
You don't seem to need the Go UP at all, BTW. Opus automatically goes up if the current folder is deleted.
(I've updated the post I linked to as well. Just using "Delete ." is much better than the previous versions. I think that may not have worked in the past but it works now. Thanks for pointing it out. )
(Show VIEWERCMD=refresh refreshes the image viewer.)
In general, you don't have to refresh to see label changes, but Opus waits until the end of the command to show the change, so you do need to if you want to see the change in the middle.
If you're only selecting things for the Properties command, you don't need to:
Properties SETLABEL Important FILE *
Go REFRESH
Delete .
If you want the files selected after the refresh, try this:
Properties SETLABEL Important FILE *
Go REFRESH
Select ALL
Delete .
Tried both scripts and there is a problem with them.
If the tab is unlocked, everything works correctly.
If the tab is locked (allow folder changes). It deletes the files but the viewer freezes and doesn't show the change. You have to refresh and in that case it gives an error and you have to click go to parent.
Could you please give a script that works with locked (allow folder changes) tabs too?
I'm inside a folder and want to delete it. A visual warning before deleting would be necessary.
But I don't want to do that because I will lose the base of the folder tree where I locked it.
Or can I lock it again with the same base folder?
And that doesn't seem like a proper solution. I don't know if it's a bug with dopus or the script is not clean.
What's a proper script for this?
Maybe if it can give a user generated message and then if clicked OK, it can go up one level and then delete the selected folder.
Can we create user messages?
This must be really simple but I have spent several hours already with no success. It's as simple as
Select ALL
Delete
Go UP
Now I need to Select the parent and delete and I can't. tried
@set ChildPath={sourcepath|nopath|noterm}
Select ALL
Delete
Go UP
Select {$ChildPath}
doesn't work, nothing selected. How can you debug in the simple scripting?
I need to see the value of {$ChildPath}. Tried Clipoboad SET, nothing works.
Nope. I have already done that. This has nothing to do with that. That is for your manual navigation.
We are talking about programming, scripting. In script when you use Go UP the folder is not selected even if you have that option on. try it, it's easy to try.