Hi
I’ve got the following script which I’ve modified;
on open these_items
repeat with i from 1 to the count of these_items
set this_item to (item i of these_items)
set the_file_name to name of (info for this_item) as string
set Charcount to count characters of the_file_name
set newName to characters -5 thru -Charcount of the_file_name as string
set this_item to newName
set theFilePath to (item i of these_items as string)
set thePOSIXFilePath to POSIX path of theFilePath as string
processFile(thePOSIXFilePath)
end repeat
end open
on processFile(this_item)
try
set terminalCommand to ""
set convertCommand to "/System/Library/Printers/Libraries/./convert "
set newFileName to this_item & ".pdf"
set terminalCommand to convertCommand & "-f " & "\"" & this_item & "\"" & " -o " & "\"" & newFileName & "\"" & " -j \"application/pdf\""
do shell script terminalCommand
end try
end processFile
The script works fine, however, when it saves the file it names it filename.eps.pdf I want it to save it as filename.pdf. Can someone suggest how I can get it to get rid of the .eps out of the saved filename. Also, I’d like to rewrite it to remove the repeat loop as it only has to process one file at a time as part of a larger script
ta!!