AnsweredAssumed Answered

Append date to beginning of exported PDF file

Question asked by dmsteffe89 on Mar 15, 2012
Latest reply on Mar 15, 2012 by dmsteffe89
Hello all,

I have searched the forums, help files, and python site for an answer to this question but could not find it as it relates to the "ExportToPDF" function.  Up to this point I have been relying on trial and error to get the dateTimeStamp in front of the filename with no success. 

Currently, I have a script that creates and exports maps in a PDF format using the same name as the mxd followed by the dateTimeStamp.  What I would like to have is a filename that shows the date first (YYMMDD) followed by the name of the map document. For example,  120315 Sewer Lines.

How can this be accomplished?  Is there another script format that allows you to change the order of elements in filenames?

Any help or insight is appreciated :)

I am using the following script:
dateTimeStamp = time.strftime('%y%m%d') arcpy.mapping.ExportToPDF(mxd,r"S:\GIS Data\Scripts\Temp PDF\Sewer Lines" + dateTimeStamp + ".pdf")