I don't know if this question fit to this site but i will try: i want to export maps to JPG files with this code:

import arcpy,os,sys,string
import arcpy.mapping
from arcpy import env

env.workspace = r"G:\PROJECTS\bneyBrakZafonMegorim\gis"
for mxd in arcpy.ListFiles("*.mxd"):
    print mxd 
    mapdoc = arcpy.mapping.MapDocument(r"G:\PROJECTS\bneyBrakZafonMegorim\gis\\" + mxd)
    arcpy.mapping.ExportToJPEG(mapdoc, r"G:\PROJECTS\bneyBrakZafonMegorim\gis\out\\"+os.path.basename(mapdoc.filePath).replace ('.mxd','') +".jpg",resolution=120)
    print 'ExportToJPEG'
del mxd

Now, the code worked fine till this morning- the maps exported to JPG files but the date and the date time of the export action didn't changed into the accurate time (today) in the windows (7 professional) operation system. This is my date time now:

enter image description here

and when i export the map i get this date time in the windows operation system:

enter image description here

  • There is no date/time in your code. Is there a dynamic text element in your MXD? If so, see what date/time that is currently showing. – PolyGeo Aug 3 '16 at 20:05
  • PolyGeo, i added another explanation now. – newGIS Aug 4 '16 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.