27
Jan/09
0

Docs Batch Export

This is an update to the old post. I’ve changed this application so that you can select the output export format.

To use it just drop a bunch of files onto the application icon and select the desired export output.

All converted documents will be placed on your desktop in a folder named temp.

Please make sure that that folder exists first.

on open filist
   set myChoices to {"pdf", "doc", "rtf", "txt"}
   set selectedChoice to choose from list myChoices OK button name "Process" cancel button name "Exit"
   if selectedChoice is false then
      error number -128
   else
      repeat with lvar in filist
         tell application "Finder"
            set thename to name of lvar
         end tell
         set x to the offset of "." in thename
         set nuname to text 1 thru text item x of thename
         tell application "Pages"
            activate
            set filname to ((path to desktop folder as text) & "temp:") & nuname & selectedChoice
            set x to make new document with properties {path:filname}
            open lvar
            save document 1 in file filname
            close every window saving no
            end tell
      end repeat
      quit application "Pages"
   end if
end open

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

Note: This post is over a year and a half old. You may want to check later in this blog to see if there is new information relevant to your comment.

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.


No trackbacks yet.