Button to delete the current folder

[quote="Zodler"]Preferences / Folders / Folder Behaviour / Select previous folder when going Up
was disabled, I enabled it and now the same script works. I don't even need all that code anymore I can just use

Go UP

I thought you already tried that according to :

[quote="Zodler"]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.[/quote]

I did not want to look into the settings. A script should be bulletproof and work in all cases regardless of the settings. Turning that setting on is not the correct solution. It's an easy workaround. I ultimately want to write a script that works in all situations. That is the goal.

Please clarify how the script should be. This script does not work correctly with "Select previous folder when going Up" disabled.

@set ChildPath={sourcepath|nopath|noterm} Go UP Select {$ChildPath}

How should it be to work with
New Folder - Copy (4)
?

Add the EXACT argument, as Leo said.

Select {$ChildPath} EXACT

Thank you very much. It's working now and it's perfect. Works in all situations and Tree navigation scenarios.

I have enabled Folder Behaviour - Calculate folder sizes automatically for local drives only.

However when I'm in a folder and delete a big file and then Go UP, Dopus still shows the old folder size like the file has not been deleted. Is this behaviour normal? I have to click Refresh. When does Dopus refresh automatically? Shouldn't navigating and going to the parent cause an automatic refresh?

For this reason I had to change the script to this.

[code]@set Parent={sourcepath|nopath|noterm}
Go UP BACK

Go REFRESH
Select {$Parent} EXACT
Delete
[/code]

Still it would be nice if Dopus refreshed automatically when you navigate by hand and go up.

If you use "Go Up Back" (or "Go Up" with Preferences / Miscellaneous / Advanced: go_up_always_back turned on), it will use a cached version of the folder if you have already been to it in the same window. Opus only automatically (re-)calculates folder sizes if they aren't cached or if you do a refresh.

This getting somewhat off-topic for "button to delete the current folder".

On the contrary, it's directly related to "button to delete the current folder". I use the same button to move selected files up and delete the folder and Dopus shows the wrong folder size when it goes up. It's for the same button.

Thank you, I made sure go_up_always_back is false and changed everything from Go Up Back to Go UP including in Preferences / File Displays / Mouse.

Now the scripts and manual navigation work correctly. There so many options that it's normal for a user to ask these questions.

The normal delete confirmation dialog will tell you how big the things you're about to delete are, unless counting has been turned off.