export mxd to PDF and JPEG files

Discussion created by rbasaria on Apr 25, 2011
Latest reply on Aug 13, 2012 by dpoursanidis
Hello all. Im trying to export batches of MXDs to PDF and JPEG format in 1 script. Rather than exporting 31 maps individually, the idea is to just run a script that will export all of them for me. I am in the testing phase, and I cannot seem to get anything working. Here is what I have so far. Any help would be greatly appreciated. Thanks!!

import arcpy.mapping

arcpy.mapping.ExportToJPEG("C:/Rafiq_GIS/PYTHONTESTING/2011/2011_CountyComm/Projects/Orange/ORA_ComDist_01.mxd", "C:/Rafiq_GIS/PYTHONTESTING/2011/2011_CountyComm/Maps/Orange/JPEG/ORA_ComDist_01.jpg")
arcpy.mapping.ExportToPDF ("C:/Rafiq_GIS/PYTHONTESTING/2011/2011_CountyComm/Projects/Orange/ORA_ComDist_01.mxd", "C:/Rafiq_GIS/PYTHONTESTING/2011/2011_CountyComm/Maps/Orange/PDF/ORA_ComDist_01.pdf")