Exclusion Rules prevent specific files or folders from being moved during organization. Use rules to protect configuration files, system folders, or any content you want to keep in place.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/shirishpothi/Sorty/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Exclusion rules are evaluated before AI processing:- Files matching any enabled rule are excluded from the organization plan
- Rules can be based on name, path, size, date, or file type
- Built-in presets provide sensible defaults for common scenarios
- Custom rules offer unlimited flexibility
Exclusion rules are deterministic and bypass AI decision-making. If a file matches a rule, it will never be moved, regardless of AI suggestions.
Rule Types
Sorty supports 12 types of exclusion rules:File Extension
Match files by their extension..env, .config), or specific file types.
File Name
Match files containing specific text in their name.- Case Sensitive: Match exact case only
- Negated: Exclude files that DON’T contain the pattern
Folder Name
Exclude entire folders by name.Path Contains
Match files whose full path includes specific text.Regular Expression (Regex)
Advanced pattern matching using regular expressions.File Size
Exclude files based on size (in megabytes).Creation Date
Exclude files based on when they were created.Modification Date
Exclude files based on last modification date.Hidden Files
Automatically match files starting with. (dot files).
This rule requires no pattern—it’s enabled/disabled with a toggle.
System Files
Match macOS and Windows system files.File Type Category
Match files by high-level category.| Category | Included Extensions |
|---|---|
| Images | jpg, png, gif, heic, webp, svg, raw, psd, ai |
| Videos | mp4, mov, avi, mkv, wmv, flv, webm, m4v |
| Audio | mp3, wav, aac, flac, ogg, m4a, aiff, midi |
| Documents | pdf, doc, docx, txt, rtf, pages, md, epub |
| Archives | zip, rar, 7z, tar, gz, dmg, iso, pkg |
| Code | swift, py, js, ts, html, css, java, rb, go, rs |
| Applications | app, exe, msi, apk, ipa |
| Fonts | ttf, otf, woff, woff2 |
| Databases | db, sqlite, sqlite3, mdb, realm |
Custom Script
Run AppleScript to determine if a file should be excluded. This allows programmatic exclusion logic based on file metadata, content, or system state.Creating Rules
Configure Options
- Description: Optional label for the rule
- Case Sensitive: Match exact case
- Negated: Invert the match logic
Rule Presets
Presets provide curated rule collections for common workflows.Available Presets
Developer Preset
Protects code project structures:Included Rules
Media Creator Preset
Protects large media files:Included Rules
Student Preset
Protects academic materials:Included Rules
Photographer Preset
Protects photography workflows:Included Rules
System Files Preset
Excludes common system and temporary files:Included Rules
Minimal Preset
Basic exclusions only:Included Rules
Applying Presets
Applying a preset removes existing built-in rules but preserves your custom rules. You can have only one active preset at a time.
Advanced Features
Case Sensitivity
Control whether text matching is case-sensitive:Negated Rules
Invert match logic to exclude files that don’t match the pattern:Rule Priority
Rules are evaluated independently:- If any enabled rule matches, the file is excluded
- Multiple rules can match the same file
- Rule order doesn’t affect evaluation (all rules checked)
Debugging Rules
Testing Rules
Verify a rule matches expected files:- Create a test rule
- Run a preview organization (don’t apply changes)
- Check the “Excluded Files” section in the preview
- Verify expected files appear in the exclusion list
Viewing Matched Rules
See which rule excluded a specific file:Performance Impact
Exclusion rules are evaluated during file scanning:- Minimal impact: Rules use efficient string matching
- Regex rules: Slightly slower (compiled once, cached)
- Large rule sets: 100+ rules may add 1-2s to scan time
Optimization Tips
Combine Rules
Use regex to combine multiple simple rules into one complex pattern.
Disable Unused Rules
Toggle off rules you don’t currently need instead of deleting them.
Use Presets
Start with a preset and add custom rules only as needed.
Avoid Wildcards
Specific patterns are faster than broad wildcards.
Integration with AI
Exclusion Enforcement
Sorty uses a two-layer approach:- Pre-filtering: Excluded files never reach the AI
- Post-validation: If AI somehow includes an excluded file, it’s caught and removed
Prompt Integration
Exclusion rules are mentioned in the AI prompt:Example Prompt Snippet
Common Patterns
Exclude Version Control
Rules
Exclude Build Artifacts
Rules
Exclude Temporary Files
Rules
Exclude Configuration
Rules
Exclude Media Workflows
Rules
Deeplink Automation
Add exclusion rules via URL schemes:Deeplink Examples
CLI Integration
CLI Commands
Troubleshooting
Rule Not Working
Symptoms: Files are being organized despite matching a rule.Solutions
Solutions
- Check rule is Enabled (toggle on)
- Verify pattern syntax (test with a simple file first)
- Check for typos in the pattern
- For regex rules, validate syntax on regex101.com
- Ensure rule type matches the file attribute you want to filter
Too Many Files Excluded
Symptoms: Very few files are being organized.Solutions
Solutions
- Review active rules and disable overly broad ones
- Check for negated rules that invert your intent
- Temporarily disable all rules to verify files scan correctly
- Use more specific patterns instead of wildcards
Regex Not Matching
Symptoms: Regex rule doesn’t match expected files.Solutions
Solutions
- Test regex on regex101.com with sample filenames
- Enable “Case Insensitive” if needed
- Escape special characters (
\.for literal dots) - Use anchors:
^for start,$for end - Test with a simpler pattern first
Best Practices
Start with a Preset
Begin with a workflow-specific preset and customize from there.
Test Before Applying
Always preview organization to verify exclusions before applying changes.
Document Complex Rules
Use the Description field to explain non-obvious rules.
Regular Maintenance
Review and clean up unused rules periodically.