Button which toggles the display of hidden files?

Is it possible to create a button which toggles the display of hidden files?

There are a few different ways, depending on exactly what you want. (e.g. Show all files no matter how they were filtered out. Or just show files that have the H attribute set. And/or while showing/hiding Hidden+System files.)

See this thread for several methods (incidentally the first match if you search for toggle and hidden :wink: ):

resource.dopus.com/viewtopic.php ... gle+hidden

The FAQ on Filter Boxes, which is linked to in one of my replies to that thread, also contains some useful information about creating buttons which clear all current filters.

If none of them do what you want, let us know.

Thank you! I found the button posted by a guy named nudel most useful and use that.

I promise that next time I will search before posting! :slight_smile:

Oops, I've seen that this button toggles the display of hidden files only for the actual directory, which makes hidden files appear in some directories and hide in other directories!

So how can I have a button which generally toggles the display of hidden files (hiding hidden files by default)?

I don't think you can toggle them in all windows at once.

The setting to hide Hidden+System does do that, but that's because it's part of Preferences (i.e. for all of Opus) rather than Folder Formats (i.e. just for the current folder and/or window).

So it's not possible to access the Preferences object with a command?

There isn't a preferences option for Hidden-but-not-System files.

There is a preferences option for Hidden-and-System files. If you want to toggle that via a command use this:

Set HIDESYSTEMFILES=Toggle

Sorry for a possibly silly question: Why not?

For what it's worth, I'm against having the same option in two places, such as Preferences and Folder Options/Formats. There are a handful of such options, where the Preferences setting lets you change the default and the other setting lets you change what happens in particular folders (or whatever), but I think it's more confusing than useful.

I'd probably move the Hidden+System option to Folder Options/Formats, so all the related options are in one place and controlled in the same way. IMO it's better to do everything at the Folder Formats level since a Checkbox in the "Custom" Folder Format works as a default as well as a checkbox in Preferences. That's just my take on it, though, and it would mean you couldn't toggle either of the two options we're talking about. (Without some new command that let you toggle options within Folder Formats and automatically apply them to all option windows, at least.)

In the case of the Hidden+System option, I guess the reason it's in Preferences and not in Folder Options/Formats is that it's assumed to be something people either want on or off, which does seem generally true. In the case of the Hidden option, on the other hand, it seems fairly common for people to want to hide Hidden files in some folders but not others, so it seems sensible that it's part of Folder Options/Formats.

None of which really helps you make a button which toggles Hidden files in all folders at once, but maybe it explains the rationale behind where the Hidden and Hidden+System settings are right now. Or at least what I assume to be the rationale. It's just my guess and may be completely wrong.

Thank you for the extensive answer. But I would not agree to the above statement. When for example using descript.ion files a lot (which have the Hidden attribute and not the System attribute) then it would be desirable have the hidden files always being hidden and only in situations where for example you want to tweak something to show them with a button. (In this case also files with BOTH the Hidden and System attribute would be shown). In my opinion this makes more sense than having overall control only for files with both attributes, since the System attribute is not a visual feature.

There is a Preferences setting which always hides "Hidden" descript.ion files:


Oh, thank you for the hint!