Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Needing PDFs created, Exported to 2 different locations

$
0
0
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.
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')


Viewing all articles
Browse latest Browse all 2485

Trending Articles