Sort Files by Date - AI Prompts | Sortio
Back to Prompts
Personal

Sort Files by Date

Date-based file sorting organizes documents, photos, receipts, and other files into folders derived from each file's creation or modification date. Rather than leaving hundreds of files in a flat directory sorted only by name, date sorting creates a chronological folder hierarchy that mirrors how people naturally think about time. Whether you need a strict year-and-month archive for tax documents, a quarterly breakdown for business reporting, or a simple this-week versus older split for daily workflow, Sortio reads your files' dates and routes them into the appropriate folders automatically. No manual dragging, no renaming, and no scripting required.

Last updated: 3/22/2026
3 prompts included

Prompts

Year and Month Folders

Sort all files into folders organized by year and month based on the file date. Create a top-level folder for each year, and inside each year folder, create a subfolder for each month using the format "01 - January", "02 - February", and so on. Place each file into the subfolder matching the month and year it was created or last modified.
Expected result: Every file is placed inside a year folder and then a month subfolder. Files from the same month and year are grouped together. Empty months are not created. The result is a clean chronological archive that is easy to browse and search.
Folder structure after:
2024/
  03 - March/
    tax-return-draft.pdf
    bank-statement-march.pdf
  07 - July/
    vacation-photo-001.jpg
    vacation-photo-002.jpg
    hotel-receipt.pdf
  11 - November/
    project-proposal.docx
    meeting-notes.txt
2025/
  01 - January/
    new-year-budget.xlsx
    gym-membership-receipt.pdf
  05 - May/
    garden-plan.png
    soil-test-results.pdf
  09 - September/
    school-schedule.pdf
    laptop-invoice.pdf
    textbook-notes.docx
2026/
  01 - January/
    annual-review.docx
    insurance-renewal.pdf
  02 - February/
    valentine-dinner-receipt.pdf
    photo-booth-pic.jpg
  03 - March/
    dentist-xray.png
    quarterly-report-q1.xlsx

Quarterly Folders

Sort all files into quarterly folders based on the file date. Create a top-level folder for each year, and inside each year, create subfolders named "Q1 (Jan-Mar)", "Q2 (Apr-Jun)", "Q3 (Jul-Sep)", and "Q4 (Oct-Dec)". Place each file into the quarter that matches its creation or modification date.
Expected result: Files are grouped into four quarters per year. Each quarter folder contains all files from that three-month window. This structure is ideal for financial documents, business reporting, and any workflow that follows a quarterly cadence.
Folder structure after:
2025/
  Q1 (Jan-Mar)/
    tax-prep-checklist.docx
    w2-form-2024.pdf
    rent-receipt-jan.pdf
    rent-receipt-feb.pdf
    rent-receipt-mar.pdf
    quarterly-savings-report.xlsx
  Q2 (Apr-Jun)/
    spring-cleaning-list.txt
    car-registration-renewal.pdf
    vacation-booking-confirmation.pdf
    graduation-photo.jpg
  Q3 (Jul-Sep)/
    summer-concert-tickets.pdf
    home-inspection-report.pdf
    back-to-school-supplies.xlsx
    labor-day-bbq-photos.zip
  Q4 (Oct-Dec)/
    halloween-costume-order.pdf
    thanksgiving-recipe-collection.docx
    holiday-gift-list.xlsx
    year-end-financial-summary.pdf
2026/
  Q1 (Jan-Mar)/
    new-year-goals.docx
    contractor-invoice-jan.pdf
    dentist-bill-feb.pdf
    pet-vet-records.pdf
    mortgage-statement-mar.pdf

Relative Time Buckets

Sort all files into folders based on how recent they are. Create three folders: "This Week" for files from the last seven days, "This Month" for files from the current calendar month that are older than a week, and "Older" for everything else. This gives me a quick view of what is recent versus what can be archived.
Expected result: The most recent files are immediately accessible in the This Week folder. Files from earlier in the current month sit in This Month. Everything older is swept into the Older folder, keeping your working directory clean and focused on what matters right now.
Folder structure after:
This Week/
  client-feedback-final.pdf
  screenshot-2026-03-21.png
  weekly-standup-notes.txt
  expense-report-draft.xlsx
  slack-export.zip
This Month/
  project-milestone-v2.docx
  design-mockup-homepage.fig
  invoice-march-2026.pdf
  team-photo-offsite.jpg
  api-documentation.pdf
Older/
  resume-2025.pdf
  tax-documents-2024.zip
  old-laptop-backup.dmg
  family-reunion-photos.zip
  archived-project-notes.docx
  signed-lease-2024.pdf
  concert-video.mp4

Customization Tips

  • Change the month format to short names like "01 - Jan" or just numbers like "03" if you prefer compact folder names.
  • Add a file-type split inside each date folder by appending instructions like "and within each month, separate Documents from Images."
  • For the relative time prompt, adjust the buckets to match your workflow — try "Today", "This Week", "This Month", and "Archive" for a more granular breakdown.
  • If you only want to sort specific file types by date, add a filter such as "Only sort PDF and XLSX files by date. Leave everything else in place."
  • Combine date sorting with a project prefix by asking Sortio to "sort by year and month, but keep files whose name starts with PROJECT together in a Projects folder regardless of date."

Troubleshooting

Problem:

Files land in unexpected months.

Solution:

Check whether Sortio is reading the creation date or the modification date. A file downloaded today may have a modification date from when it was originally authored.

Steps:

  1. 1Compare file dates in Finder with the sort results.
  2. 2Specify "sort by creation date" or "sort by modification date" in your prompt to control which date is used.

Problem:

Files with no reliable date metadata are sorted incorrectly.

Solution:

Files copied from external drives may default to the date they were copied. Consider renaming these files with a date prefix before sorting.

Steps:

  1. 1Identify files with incorrect dates.
  2. 2Add a date prefix to the filename (e.g., "2025-01-15_filename.pdf").
  3. 3Re-run the sort.

Problem:

The Older folder in the relative time prompt contains too many files.

Solution:

Refine it by splitting into "Last 3 Months" and "Archive" for better granularity.

Steps:

  1. 1Update the prompt with more time buckets.
  2. 2Re-run the sort with the refined prompt.

Problem:

Large folders with thousands of files are slow to process.

Solution:

Try running the sort on smaller batches by selecting specific file types first.

Steps:

  1. 1Filter by file type before sorting.
  2. 2Run in batches.
  3. 3Combine results.

Problem:

Quarter folders do not match your fiscal year.

Solution:

Adjust the quarter definitions in your prompt — for example, "Q1 is Feb-Apr" for a February fiscal year start.

Steps:

  1. 1Update the prompt with your custom quarter date ranges.
  2. 2Re-run the sort.

Frequently Asked Questions

Does Sortio use the file creation date or the modification date?

Sortio reads the file metadata available from your operating system, which typically includes both creation and modification dates. By default, it uses the most relevant date for sorting. You can specify which date to use in your prompt by writing something like "sort by creation date" or "sort by the date the file was last modified."

What happens to files that have no date metadata?

Files always have at least a filesystem modification date assigned by the operating system. In rare cases where a file was copied or transferred and lost its original date, the date will reflect when the copy occurred. These files will still be sorted, just based on the available date rather than the original one.

Can I combine date sorting with other sorting criteria?

Yes. You can layer date sorting with file-type sorting, project-based sorting, or any other criteria. For example, you could ask Sortio to "sort files by year and month, and within each month folder, group by file type." Sortio handles multi-criteria prompts natively.

Will empty month or quarter folders be created?

No. Sortio only creates folders that will contain files. If you have no files from August 2025, no August folder will appear. This keeps your directory tree clean and free of clutter.

How does the relative time prompt handle files as time passes?

The relative time buckets are based on when you run the sort. If you run it again next week, files that were in This Week will move to This Month or Older as appropriate. Running the sort periodically keeps your folders current.

Related Glossary Terms

Ready to Try These Prompts?

Download Sortio and paste these prompts to instantly organize your files with AI-powered intelligence.

Download Sortio Free