Advanced Metadata Filtering Techniques
Filter files by EXIF, hashes, and provider-specific metadata

What You'll Learn
  • Understanding metadata structure in FileFortress
  • EXIF data filtering for photos
  • File hash searches and duplicate detection
  • Provider-specific metadata (Google Drive, OneDrive, S3, Backblaze)
  • Metadata operators and combining filters
  • Performance optimization tips

Overview

FileFortress stores rich metadata about your files, including EXIF data for photos, file hashes, owner information, and provider-specific attributes. The --meta option provides powerful filtering capabilities to search files based on this metadata.

Understanding Metadata Structure

FileFortress organizes metadata into several categories:

EXIF Data

  • exif.cameraMake
  • exif.cameraModel
  • exif.lens
  • exif.focalLength
  • exif.aperture
  • exif.iso
  • exif.takenAt
  • exif.gpsLatitude
  • exif.gpsLongitude

Image Data

  • image.width
  • image.height
  • image.format
  • image.colorSpace
  • image.bitDepth

Hash Data

  • hash.md5
  • hash.sha1
  • hash.sha256

Owner/Sharing

  • owner.email
  • owner.name
  • sharing.shared
  • sharing.permissions

Metadata Operators Reference

FileFortress supports powerful operators for metadata filtering:

Operator Description Example
= Equals (exact match) --meta "exif.cameraMake=Canon"
!= Not equals --meta "sharing.shared!=true"
>= Greater than or equal --meta "image.width>=1920"
> Greater than --meta "exif.iso>800"
<= Less than or equal --meta "image.width<=1024"
< Less than --meta "exif.aperture<2.8"
~= Contains (case-insensitive) --meta "owner.email~=gmail.com"
^= Starts with --meta "hash.md5^=d128a6ef"
$= Ends with --meta "mime.type$=jpeg"
in Value in pipe-separated list --meta "exif.cameraMake in Canon|Nikon|Sony"
exists Key exists (no value needed) --meta "exif.gpsLatitude exists"

EXIF Data Filtering for Photos

Filter by Camera

Find photos from specific camera brand:
filefortress search "" --media-type image --meta "exif.cameraMake=Canon"
Find photos from multiple camera brands:
filefortress search "" --media-type image --meta "exif.cameraMake in Canon|Nikon|Sony"
Find photos from specific camera model:
filefortress search "" --meta "exif.cameraModel=EOS R5"

Filter by Lens and Settings

Find photos with specific lens:
filefortress search "" --meta "exif.lens~=70-200"
Find photos with wide aperture (shallow depth of field):
filefortress search "" --meta "exif.aperture<=2.8"
Find high ISO photos:
filefortress search "" --meta "exif.iso>=3200"
Find telephoto shots:
filefortress search "" --meta "exif.focalLength>=200"

Filter by Date and Time

Find photos taken after specific date:
filefortress search "" --meta "exif.takenAt>=2024-01-01"
Find photos taken in date range:
filefortress search "" --meta "exif.takenAt>=2024-01-01" --meta "exif.takenAt<=2024-12-31"

Filter by Location (GPS)

Find photos with GPS data:
filefortress search "" --meta "exif.gpsLatitude exists"
Find photos without GPS data:
filefortress search "" --media-type image --meta "exif.gpsLatitude exists" --meta "exif.gpsLatitude!="

Image Dimension Filtering

Find high-resolution images (4K+):
filefortress search "" --meta "image.width>=3840" --meta "image.height>=2160"
Find portrait orientation photos:
filefortress search "" --media-type image --meta "image.height>image.width"
Find square images:
filefortress search "" --meta "image.width=image.height"

File Hash Searches

Use file hashes for duplicate detection and exact file matching:

Find file by exact MD5 hash:
filefortress search "" --meta "hash.md5=d128a6ef7f2e8f5c9b1a2c3d4e5f6a7b"
Find files by hash prefix (useful for partial matches):
filefortress search "" --meta "hash.md5^=d128a6ef"
Find files with hash (enriched files only):
filefortress search "" --meta "hash.md5 exists"
About File Hashes

File hashes are computed during the enrichment process. Run filefortress remotes enrich to calculate hashes for your files. This enables duplicate detection and exact file matching.

Provider-Specific Metadata

Google Drive & OneDrive

Find shared files:
filefortress search "" --remote-type gdrive --meta "sharing.shared=true"
Find files owned by specific user:
filefortress search "" --meta "[email protected]"
Find files from company domain:
filefortress search "" --meta "[email protected]"

Amazon S3 & Backblaze B2

Find files in specific bucket:
filefortress search "" --remote-type s3 --remote-name "my-bucket"
Find files by storage class:
filefortress search "" --remote-type s3 --meta "storage.class=GLACIER"

Combining Multiple Metadata Filters

Chain multiple --meta options to create complex queries. All conditions must match (AND logic):

Find Canon photos from 2024 with high resolution:
filefortress search "" --meta "exif.cameraMake=Canon" --meta "exif.takenAt>=2024-01-01" --meta "image.width>=4000"
Find wide-aperture telephoto shots:
filefortress search "" --meta "exif.focalLength>=200" --meta "exif.aperture<=2.8"
Find unshared company files:
filefortress search "" --meta "[email protected]" --meta "sharing.shared=false"

Real-World Use Cases

Photography Workflows

Find portfolio-quality images

High-resolution Canon photos with wide aperture:

filefortress search "" --meta "exif.cameraMake=Canon" --meta "exif.aperture<=2.8" --meta "image.width>=4000" --save-query "portfolio-quality"

Find event photos by date and camera

All photos from wedding day with specific camera:

filefortress search "wedding" --meta "exif.takenAt>=2024-06-15" --meta "exif.takenAt<=2024-06-15" --meta "exif.cameraMake=Canon"

Duplicate Detection

Find potential duplicates by hash

Use find duplicates command or search by hash:

filefortress find duplicates --save-query "all-duplicates"

File Organization

Find files to archive

Large, old files without GPS data:

filefortress search "" --size-min 100MB --modified-before "365 days" --meta "exif.gpsLatitude exists" --meta "exif.gpsLatitude="

Performance Optimization

Use specific filters first: Start with file extension or media type filters to reduce the search space
Limit to specific remotes: Use --remote-name or --remote-type when possible
Enrich strategically: Only enrich files you need to search by hash
Use saved queries: Save complex metadata queries for reuse with --save-query
Index optimization: Regular scans keep metadata up to date

Common Pitfalls

Metadata not available

Solution: Not all files have all metadata. Use exists operator to check if metadata is present before filtering by value.

Hash searches return no results

Solution: File hashes are only available after enrichment. Run filefortress remotes enrich to calculate hashes.

Date comparisons not working

Solution: Use ISO 8601 format (YYYY-MM-DD) for date comparisons. Example: --meta "exif.takenAt>=2024-01-01"

Related Resources

Search Syntax Guide
Complete search syntax reference
Photography Workflow
EXIF-based photo organization
search Command
Command reference