AnsweredAssumed Answered

Why is arcpy.env.scratchFolder using my gdb scratch

Question asked by aarcichowski@invenergy.com_invenergyllc on Sep 28, 2020
Latest reply on Sep 28, 2020 by rvburton

Hello ,


When I use arcpy.env.scratchFolder in my python script (arcmap 10.7, py 2.7) why is it using my scratch file gbd and not my folder ? 


below is the code and image. The script only works when I remove the gbd from the path  ? 


arcpy.env.overwriteOutput = True
outFolder = arcpy.env.scratchFolder

featureLayer = arcpy.GetParameter(0)
outPutName = arcpy.GetParameterAsText(1)
outputFormat = arcpy.GetParameterAsText(2)

if outputFormat == "kmz":
     kmzFile = os.path.join(outFolder, "{0}.kmz".format(outPutName))
     arcpy.MakeFeatureLayer_management(featureLayer, outPutName)
     arcpy.LayerToKML_conversion(outPutName, (os.path.join(outFolder,outPutName))
     arcpy.AddMessage("Success. You can find the kmz in the link below")
elif outputFormat == "shp":     
     arcpy.AddMessage("shp file")