Hallo zusammen,
ich habe im Netz ein applescript gefunden, welche mir alle .pages-Dateien in einem Ordner zu .docx umwandelt. ich hätte es nun aber gerne so, dass auch die Dateien in den Unterordner berücksichtigt werden. Kann mir dabei jemand helfen? Hab leider nichts hilfreiches (jedenfalls für mich als applescript-noob) über google gefunden. Ich schätze, für einen Könner sind das nur wenige Zeichen die ergänzt werden müssen, oder?
Hier das script:
set my_pagesFolder to choose folder
tell application "Finder"
set these_files to (every file of my_pagesFolder whose kind is "Pages-Dokument") as alias list
if not (exists folder "Pages>Word" of folder my_pagesFolder) then
set dest to (make new folder at my_pagesFolder with properties {name:"Pages>Word"}) as string
else
set dest to (my_pagesFolder as text) & "Pages>Word:"
end if
end tell
repeat with i from 1 to the count of these_files
set this_file to (item i of these_files)
tell application "Pages"
activate
set the_document to open this_file
set nn to the_document's name
set name_no_ext to the result
-- doc oder docx:
export the_document to file (dest & name_no_ext & ".docx") as Microsoft Word
close the_document
end tell
end repeat
Danke!
ich habe im Netz ein applescript gefunden, welche mir alle .pages-Dateien in einem Ordner zu .docx umwandelt. ich hätte es nun aber gerne so, dass auch die Dateien in den Unterordner berücksichtigt werden. Kann mir dabei jemand helfen? Hab leider nichts hilfreiches (jedenfalls für mich als applescript-noob) über google gefunden. Ich schätze, für einen Könner sind das nur wenige Zeichen die ergänzt werden müssen, oder?
Hier das script:
set my_pagesFolder to choose folder
tell application "Finder"
set these_files to (every file of my_pagesFolder whose kind is "Pages-Dokument") as alias list
if not (exists folder "Pages>Word" of folder my_pagesFolder) then
set dest to (make new folder at my_pagesFolder with properties {name:"Pages>Word"}) as string
else
set dest to (my_pagesFolder as text) & "Pages>Word:"
end if
end tell
repeat with i from 1 to the count of these_files
set this_file to (item i of these_files)
tell application "Pages"
activate
set the_document to open this_file
set nn to the_document's name
set name_no_ext to the result
-- doc oder docx:
export the_document to file (dest & name_no_ext & ".docx") as Microsoft Word
close the_document
end tell
end repeat
Danke!