Get in touch:
01524 851 877
07718 896 553

Image File Conversion Script

Posted on Jan 12 2011

Here’s a nice simple script to convert all the pdf files in a directory to jpg files using the convert program. To use this you will need ImageMagick installed on your Linux/Unix host.

#!/bin/bash

for file in `ls *.pdf`
do
   convert $file `echo $file | sed 's/\.pdf$/\.jpg/'`
done