View Single Post
Ok thanks but I way talking about the input directory, how to set it ?
I have a folder with subfolder, the input would be the main folder. Every day there is change with all the .oo3, every day I launch a bash script who save all data to the has. To the has I want the .oo3 and the .pdf. So within the bash script I would like to add an applescript which gonna use the main folder and convert all the file in .pdf and move them to the has. So here in the script I don't know how to change the input, front document.

Quote:
Originally Posted by whpalmer4 View Post
Right there in the command line you supply:

Code:
osascript -e 'tell application id "OOut" to export front document as "OORTFPboardType" to "~/tmp.rtf"' > /dev/null 2>&1
/System/Library/Printers/Libraries/convert -f  ~/tmp.rtf -o output2.pdf > /dev/null 2>&1
the "-o output2.pdf" portion of the convert command tells it to write the output to a file named "output2.pdf" in the current directory. If you want to put it in the directory called "Example" in your home directory, that would be "-o ~/Example/output2.pdf" and so on. Rob's illustrative snippet illustrates the process of building up that command string. To save you the trouble of copying the file to the NAS volume and then deleting the local copy, you could write it directly to the NAS volume. All of this supposes that you've already figured out what the name of the file is going to be, of course...