MLCouden

Needing PDFs created, Exported to 2 different locations

Discussion created by MLCouden on Mar 12, 2013
Latest reply on Mar 12, 2013 by lmwood
I have my python code written. IT actually works. I just don't know how to code the pdfPath to 2 different locations. Please help with code.
import arcpy, os

folderPath = r"K:\TASS\2 - GEO-DATA PROCESSING SUPPORT\MICHELLE'S WORK_ENTER NOT!!\Work Folder\Perm Site Mapping\ARCMAP Perm Site Maps"

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)
            pdfPath = ['K:\PRODUCTS\Maps\Printable Maps\Test Permanent Site Maps', 'T:\TRAFFIC\TASS\Web_Traffic\Permanent']
            arcpy.mapping.ExportToPDF(mxd, pdfPath + os.sep + basename.split("\\")[-1] + '.pdf')
            

Outcomes