Solution total command way delete

Want to provide a public solution how to delete files and folders in total commander style. Means F8 deletes marked or focused files:

Add a new shortcut


And use this script:

function OnClick(clickData)
	// Requires Opus 12.11 or above.
	var cmd = clickData.func.command;

	var tab = clickData.func.sourcetab;
	var focusItem = tab.GetFocusItem();

	var selectedItems = tab.selected; 

	if (tab.selstats.selfiles > 0 || tab.selstats.seldirs > 0){
		cmd.setFiles( selectedItems );
		if (focusItem != null) {

For secure wipe (shift+F8) just use the command "delete secure".

Those will already be selected into the command object (when you get it via clickdata) so you don't need to do that part.

tab.selected.count is a quick way to check is anything is selected.