Hi Sean,
Try something like:
import arcpy, os
folderPath = r"C:\Project"
outFolder = r"C:\Project\PDFs" ## create an output folder
for filename in os.listdir(folderPath):
fullpath = os.path.join(folderPath, filename)
if os.path.isfile(fullpath):
basename, extension = os.path.splitext(fullpath)
if extension.lower() == ".mxd":
mxd = arcpy.mapping.MapDocument(fullpath)
arcpy.mapping.ExportToPDF(mxd, outFolder + basename + '.pdf')
You will probably need to create ‘PDFs’ folder before running script.
Regards,
Craig
C. Poynter
Information Technology Officer (Spatial Analysis) | Research Office, Spatial Data Analysis Network (SPAN)
Charles Sturt University
Boorooma Street
Wagga Wagga, NSW, 2678
Australia
Phone: +61 2 69332165
Fax: +61 2 69332735
Email: cpoynter@csu.edu.au<mailto:cpoynter@csu.edu.au>
www.csu.edu.au<http://www.csu.edu.au/>