Function Repository Resource:

ExploreDirectory

Source Notebook

Create a file explorer interface for a directory

Contributed by: Bob Sandheinrich

ResourceFunction["ExploreDirectory"][dir]

creates a vertical interface for exploring the first level of the contents of a directory.

ResourceFunction["ExploreDirectory"][dir,n]

explores to level n.

Details and Options

Each directory or file in the explorer is represented by a button that will open the content. Notebook and package files are opened in the Wolfram Language session; directories and all other files are opened by the operating system.
The level specification n accepts the same values as the third argument of FileSystemMap.
ResourceFunction["ExploreDirectory"] accepts the same options as FileSystemMap, including MaxItems.

Examples

Basic Examples (2) 

Explore the top level:

In[1]:=
ResourceFunction["ExploreDirectory"][$InstallationDirectory]
Out[1]=

Explore two levels deep:

In[2]:=
ResourceFunction["ExploreDirectory"][$InstallationDirectory, 2]
Out[2]=

Scope (1) 

Explore the 2nd and 3rd levels, showing only two items from each subdirectory:

In[3]:=
ResourceFunction["ExploreDirectory"][$InstallationDirectory, {2, 3}, MaxItems -> 2]
Out[3]=

Neat Examples

Hey Birdnardo, what is in your nest?

In[4]:=
ResourceFunction["BirdSay"][
 ResourceFunction["ExploreDirectory"][
  ResourceSystemClient`ResourceObjectDirectory[
   ResourceObject["BirdSay"]["UUID"]], Infinity]]
Out[4]=

Version History

  • 1.0.0 – 30 September 2020

Related Resources

License Information