Folder names with leading period are hidden in Sketchbook Menu/Sidebar

Not sure if this is a bug or a feature, and if it's a feature, what it's purpose is.

Having noticed that the Sketchbook menu and sidebar use alphabetical sorting for displaying sketches and subfolders that are saved in the Sketchbook folder (which causes sketches and subfolders to be "mixed", unlike what one might be used to from Windows Explorer, etc.), I attempted to make the subfolders appear at the top of the list (above the sketches) by using subfolder names with a non-alpha prefix character.

I happened to choose a period character as the prefix (e.g., .ProjectFolder01) and found to my surprise that the subfolder disappeared from view altogether. I'm just talking about subfolders that are used for organizing sketches, not the sketch folder itself (so the issue is not that there is no .ino file with a matching name).

My method for sorting subfolders works perfectly when using other prefix characters (e.g., +ProjectFolder01), so the leading period character in particular is evidently triggering some special handling by the IDE. The fact that this appears to be limited to the period character is why I believe that the behavior may be intentional, although such a feature does not appear to be documented anywhere, nor is its purpose clear.

Any thoughts? Bug or feature?

The . prefix indicates a hidden file. If you go to View on the folder options and check Show Hidden Files they should show up (with possibly others you didn't know about).

Standard behavior

Even if you're on Windows, directories like .git and .vscode expect to be hidden.

@oldcurmudgeon @kenb4

In Windows (which is what I'm using), the dot prefix does not hide a file or folder. One must set a file/folder attribute to hide items (and the "Hidden" attribute can be set on files or folders that do not have a dot prefix). Here are two folders displayed in Windows Explorer, with the option "Don't show hidden files, folders, or drives" enabled:

As you can see, the .foo folder is plainly visible (and appears above bar when sorted alphabetically by name).

A related observation is that if I do set the "Hidden" attribute for a subfolder in the Sketchbook folder (or if I set the "Hidden" attribute for a sketch folder and its .ino file), then the Arduino IDE does display the content that is supposed to be hidden!

So is the take-away that the Arduino IDE app for Windows has been deliberately designed to emulate Unix/macOS behavior when it comes to deciding what folders get hidden in the Sketchbook?

Yes. It is a cross-platform convention, especially for programming.

This may be a good place in the documentation to:

  • Mention that the Sketchbook folder supports the use of subfolders; and
  • Specify the naming conventions for Sketchbook subfolders (which evidently differ significantly from the naming requirements for sketch root folders).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.