Files icon indicating copy to clipboard operation
Files copied to clipboard

Feature: query based "magic" folders

Open alshdavid opened this issue 5 months ago • 5 comments

What feature or improvement do you think would benefit Files?

Say I have a "source" folder with documents that I have manually added metadata to categorize

/mydir/
  /more-docs
      more-doc1.txt
      more-doc2.txt
  doc1.txt
  doc2.txt
  doc3.txt

I'd love the ability to query a source folder to filter files against that metadata and, crucially, create "magic" folders that encapsulate/shortcut those queries where the contents of those folders represent the queried files.

This would also necessitate a simple interface to edit a file's metadata.

Examples of use cases are;

  • Viewing music against genre, artist, date (or other arbitrary tags)
  • Viewing videos against genre, director, actors, year, etc

Example

I would store my source files in a /source folder and create "query based magic folders" next to it;

/source
  /video1/video1.mp4
  /video2/video2.mp4

 # SELECT "**/*" FROM "./source" GROUP BY director
/by-director
  /foo
    video1.mp4 -> ../../source/video1.mp4
  /bar
    video2.mp4

 # SELECT "**/*" FROM "./source" GROUP BY genre
/by-genre
  /action
    video1.mp4 -> ../../source/video1.mp4
  /adventure
    video2.mp4

Note: the query syntax is just an example as it needs to be a richer to accommodate concepts like creating sub folders, grouping associated files together, search by content hash, etc.

Requirements

  • Creating a "magic" folder whose contents are a representation of a search query

Files Version

0.0.0

Windows Version

11

Comments

I guess I could implement this outside of Files as a CLI tool (or daemon service) that generates symlinks from a supplied query, but it would be cool to have

alshdavid avatar May 12 '25 22:05 alshdavid