The other week I was in the process of reorganizing my calendars in iCal, and basically I wanted to merge several calendars together. Apple does not make it really easy to perform this task as there is no readily available option in iCal. However they provide an excellent tutorial for this:

To export events and to-do items from a calendar:

  1. From the Calendar list, select the calendar that contains the events and to-do items you want to export.
  2. Choose File > Export > Export.
    The events are exported as an iCalendar (.ics) file.
  3. If you no longer want to use the calendar you exported, hide the calendar’s events or delete the calendar.

To import events and to-do items into a calendar:

  1. If you want to import your events and to-do items into a new calendar, first create the calendar.
  2. Choose File > Import > Import.
  3. Locate the calendar file that contains the events and to-do items you want to import, and then click Import.
  4. Choose the calendar you want to add the events to.

To import events and to-do items, you can also drag a .ics file from your desktop to iCal.

Alternatively you can create a script so that you manually move items from one calendar to another. Make sure you have a backup of your data – just in case!

Open TextEdit, make sure you are editing in Plain Text (Format > Make Plain Text), paste the following text and save the file with .scpt extension.

tell application "iCal"
	set allEvents to events of calendar "A"
	repeat with theEvent in allEvents
		copy theEvent to end of events of calendar "B"
		delete theEvent
	end repeat
end tell

Now, from Terminal, execute the file using osascript.

Mbx:~ branix$ osascript ~/iCalMove.scpt