Here it is. You can get it from MacScripter:
on run
doyourduty(choose file with multiple selections allowed)
end run
on opendroppedItems
doyourduty(droppedItems)
end open
on doyourduty(theItems)
repeat with anItem in theItems
tell application "Finder"
set {name:fileName, name extension:nameExtension, class:itemClass, container:parentFolder} to item (anItem as text)
set isFolder to itemClass is folder
end tell
if isFolder then
tell application "Finder" to set itemList to items of anItem
doyourduty(itemList)
else
if nameExtension is "cwk" then
tell application "Pages"
open (anItem as alias)
-- Save file to folder that dropped file exists in.
set docPathAndName to (parentFolder as text) & text 1 thru -4 of fileName & "pages"
save front document in docPathAndName
close front document
end tell
end if
end if
end repeat
end doyourduty