JS script to sort my .ics files by date, a related anecdote from a website
Posted: 07 Oct 2026 20:39
Hello,
I wanted to share a script that I finally got to run properly, because it took me a whole week to figure out two months ago. The basic need: I export quite a few .ics files from Outlook for my client appointments, and I wanted XYplorer to automatically sort them into monthly subfolders as soon as they land in my “watch” folder. A JavaScript script that reads the date from the file and moves them according to the month ended up doing the job once I figured out how to properly parse the DTSTART field. The real problem was actually somewhere else. With shared custody of my son (every other week with his mom or rather, with my ex), I had my work calendar on one side and the shared custody calendar on the other, and the two were constantly conflicting. Long story short: duplicate entries, missed appointments because I was looking at the wrong calendar it was a total nightmare for several days. I looked into standard synchronization methods, tested a couple of settings in Outlook—nothing worked. Then, while browsing the animation forum I frequent (I hang out on a bunch of forums at the same time), I stumbled upon an old thread where a guy detailed a method using link removed to sync two calendars without duplicates. I tested it the following weekend, and since then the two calendars have been working together without me having to double-check three times whether I’m supposed to pick up my son or not.
I wanted to share a script that I finally got to run properly, because it took me a whole week to figure out two months ago. The basic need: I export quite a few .ics files from Outlook for my client appointments, and I wanted XYplorer to automatically sort them into monthly subfolders as soon as they land in my “watch” folder. A JavaScript script that reads the date from the file and moves them according to the month ended up doing the job once I figured out how to properly parse the DTSTART field. The real problem was actually somewhere else. With shared custody of my son (every other week with his mom or rather, with my ex), I had my work calendar on one side and the shared custody calendar on the other, and the two were constantly conflicting. Long story short: duplicate entries, missed appointments because I was looking at the wrong calendar it was a total nightmare for several days. I looked into standard synchronization methods, tested a couple of settings in Outlook—nothing worked. Then, while browsing the animation forum I frequent (I hang out on a bunch of forums at the same time), I stumbled upon an old thread where a guy detailed a method using link removed to sync two calendars without duplicates. I tested it the following weekend, and since then the two calendars have been working together without me having to double-check three times whether I’m supposed to pick up my son or not.