Switch Rule

Filename is "date-event" but you want "event-date"? Names in the wrong order? Swap them with one click.

What This Can Help You With

  • Photo naming order is wrong: Change 20240115-trip.jpg to trip-20240115.jpg so the event name comes first for easier browsing
  • Name order needs adjustment: Change John-resume.pdf to resume-John.pdf for consistent naming format
  • Project file version placement: Change v2.0_project-report.docx to project-report_v2.0.docx to make the title more prominent
  • Only swap the name, keep the extension: Preserve .jpg .pdf extensions unchanged, only swap the filename parts

Quick Start (3 Steps)

  1. Click the "Add Rule" button β†’ Select "Switch"
  2. Fill in the delimiter:
    • Delimiter: Such as -, _, or space (whatever separates the two parts in your filename)
  3. Preview first, then apply if it looks good to avoid swapping mistakes

Examples

Example 1: Swap Event and Date in Photo Names

❌ Original files: 20240115-trip.jpg, 20240116-dinner.jpg, 20240117-meeting.jpg... 😫 Problem: Date comes first, making it hard to find "trip" photos by scrolling - want the event name in front

βœ… Settings:

  • Delimiter: -

βœ… Result: trip-20240115.jpg, dinner-20240116.jpg, meeting-20240117.jpg...

Why these settings: Using - as the boundary, the "trip" part moves to the front, the date moves to the back, and the .jpg extension stays unchanged.


Example 2: Standardize Name Format

❌ Original file: John-resume.pdf 😫 Problem: Filename is "name-resume" format, want to change to "resume-name" for better organization

βœ… Settings:

  • Delimiter: -

βœ… Result: resume-John.pdf

Why these settings: Same logic - split by -, swap front and back, extension stays the same.


Example 3: Filename Has Multiple Delimiters

❌ Original file: project-phase1-draft.docx 😫 Problem: Filename has two - characters, want to move "draft" to the very front

βœ… Settings:

  • Delimiter: -

βœ… Result: draft-project-phase1.docx

Why these settings: The rule matches the last - (greedy matching), swapping "project-phase1" on the left with "draft" on the right, so "draft" ends up at the front.

Settings Explained

Basic Settings

  • Delimiter Whatever separates the two parts in your filename, such as -, _, space, or -- (This cannot be empty, otherwise the rule won't know where to split and swap)

Advanced Options (Optional, defaults work fine)

  • Ignore Extension Checked by default, only swaps the filename, leaving .jpg, .pdf extensions untouched. If you really need to include the extension in the swap, uncheck this option (not recommended - may break file associations).

FAQ

❓ What happens if my filename doesn't contain the delimiter I specified?

The rule will leave the filename unchanged - no errors, no unexpected modifications.

Example: Delimiter is set to -, but filename is report.docx (no -) β†’ Result is still report.docx, unchanged

❓ What happens if the delimiter appears multiple times?

The rule will split at the last delimiter (greedy matching).

Example: Filename A-B-C.txt, delimiter set to - β†’ Matches the last -, swaps A-B with C β†’ Result is C-A-B.txt

❓ Can I use multiple characters as a delimiter?

Yes, the rule supports delimiters of any length.

Examples:

  • Delimiter __ (two underscores): front__back.txt β†’ back__front.txt
  • Delimiter --- (three hyphens): title---date.md β†’ date---title.md

❓ Does the delimiter stay after swapping?

Yes, the delimiter itself is preserved - only the content on either side gets swapped.

Example: A-B.txt swapped with - becomes B-A.txt, the - is still there

Important Notes:

  • ⚠️ Empty delimiter: Nothing will change - effectively a no-op, always fill this in
  • ⚠️ Wrong delimiter: Make sure it exactly matches what's in your filename (including case and number of spaces)
  • ⚠️ Unchecking "Ignore Extension": May include .jpg .txt in the swap, potentially breaking file associations

Advanced Tips

  • βœ… Combine with "Find & Replace": First use Switch to adjust the order, then use Find & Replace to change the delimiter to your preferred symbol (like changing _ to -)
  • βœ… Combine with "Insert Text": After swapping, add batch labels at the front or back (like 2024-)
  • βœ… Batch process different formats: If your files have different delimiters (some use -, some use _), you can process them in two passes, or use a multi-rule pipeline

What to Check Out Next?

  • Find & Replace: After swapping, change the delimiter itself or replace certain keywords
  • Insert Text: After swapping, add content at a specific position
  • Remove Text: After swapping, delete unwanted parts