ファイルの拡張子を自動で変えたい
ファイルの拡張子を一括で変更したいというニーズはやはりある。
いちいち手作業で拡張子を変えるのはめんどくさい。
そこでAppleScriptで一括拡張子変換するスクリプトを書いてみたので公開。
var app = Application("Keynote") var doc = app.Document() //doc.text = "test" //app.documents.push(doc) app.documents[0].save({ in : Path("/Users/takuya/Desktop/sample2.key") }) console.log(app.documents[0].name()) app.documents.at(0).export app.documents.at(0).export({ as : "PDF", to : Path("/Users/takuya/Desktop/sample2.pdf") })
このソースでkey拡張子を自動でpdfに書き換えます。