How to temporarily hide certain files with a hotkey

Is there a way to select a file in a Lister, then activate a hotkey that temporarily hides all files except the selected file? Maybe the hotkey can be toggleable: press it once to hide non-selected files, then press it again to unhide the files.

Thanks for any help!

Make a hotkey which runs Select NOPATTERN HIDEUNSEL

To reveal the files again, Select NOPATTERN SHOWHIDDEN

Thank you for the help.

When I select a file and temporarily hide unselected files (using the Select NOPATTERN HIDEUNSEL command), the selected file remains selected when I unhide the temporarily hidden files (using the Select NOPATTERN SHOWHIDDEN command).

However, when Directory Opus unhides the previously un-selected files, the Lister scrolls up to the top of the file display pane. If the originally selected file's location in the file list is not visible when the Lister
scrolls up to the top of the Lister, I have to manually scroll down to find that file again.

Is there a command that makes the Lister not scroll away from the selected file, that is, the selected file remains selected regardless of where it is in the Lister file display?

Thanks!

For me, things are no longer selected when unhidden. Unhiding also doesn't cause scrolling, at least in Details mode.

Are you using the current version 13.10.x?

I am running Directory Opus v13.10.2 BETA [x64].

The file I select to be the only file shown, with the rest of the un-selected files being hidden, remains selected only if the selected file's location is within the visible area of the current folder's root directory (in the File Display's right-side window pane).

If my selected file is located farther down the directory tree (meaning I have to scroll down initially to select the file I want to isolate in the Lister), when I hide then unhide the un-selected files, my selected file is not selected anymore. I hope I am making sense. If needed, I can post some pictures of what I mean.

Try this code in a button:

@if:=(selitems==totalitems)
Select NOPATTERN SHOWHIDDEN
@if:else
Select NOPATTERN HIDEUNSEL

or something shorter but possibly confusing

Select {=selitems==totalitems ? "Select NOPATTERN SHOWHIDDEN" : "Select NOPATTERN HIDEUNSEL"=}

Try appending

Select SHOWFOCUS

It sounds like expanded folders are involved? That could complicate things.

What exactly is being done, in what scenario?

That works! Thank you, @lxp!

EDIT: I'm sorry, @lxp, I responded to the wrong person. I meant to respond to @jinsight, not you. :roll_eyes:

Thank you, @jinsight, this code works.

1 Like