Skip to content

Batch convert files to PDFs in OSX Mountain Lion

2012 December 12
tags: , ,
by Tedb0t

Today I needed to convert a bunch of RTF files (I know, what?) to PDFs.  After stumbling through a bunch of dead ends, I realized this—like most things—could be done incredibly easily in Bash:

for file in *.rtf ; do
filename=$(basename "$file") /usr/sbin/cupsfilter "$file" > "$filename.pdf"

Related Posts:

Comments are closed.