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.jpgtotrip-20240115.jpgso the event name comes first for easier browsing - Name order needs adjustment: Change
John-resume.pdftoresume-John.pdffor consistent naming format - Project file version placement: Change
v2.0_project-report.docxtoproject-report_v2.0.docxto make the title more prominent - Only swap the name, keep the extension: Preserve
.jpg.pdfextensions unchanged, only swap the filename parts
Quick Start (3 Steps)
- Click the "Add Rule" button β Select "Switch"
- Fill in the delimiter:
- Delimiter: Such as
-,_, or space (whatever separates the two parts in your filename)
- Delimiter: Such as
- 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.jpgextension 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,.pdfextensions 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.txtin 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