I have been given the task of converting a large number of files form Clarisworks to OfficeX Word. I have decided the best way of doing this will be to open the ClarisWorks doc in OfficeX Word and then save them so they can be opened on a Windows PC with Office loaded. Now there are about 5000 files to convert, so I thought the best way would be to create a script. Am very new to Applescript but have lots of experience with Visual Basic, so would love to get a handle on it.
The bit I am having trouble with is how to loop through files in a folder. The aim is to craete a script that will open/save each clarisworks file in the folder and save as an OfficeX word doc.
Any help/pointers would be gratefully recieved!!
This is just a start. This should give you some ideas. I used AppleWorks 6 in this script. If you’re using Claris Works you’ll need to change the program name in that line. Also you may need to change the syntax for saving. I don’t know how scriptable Claris is. You can open the dictionary for Claris from AppleScript. Anyway, here is what I have.
tell application "Finder"
set sourceFolder to choose folder with prompt "Choose folder with files for conversion."
set fileList to every file of sourceFolder
set destinationFolder to choose folder with prompt "Choose the destination."
set destPath to destinationFolder as string
tell application "AppleWorks 6"
set n to 1
repeat with aFile in fileList
--get properties of aFile (I used this line to get the information on the file type of the original document)
set fileName to name of aFile
set filePath to destPath & fileName
save front document in file filePath as file type "CWWP"
--do other operations here