I want to apply layer symbology to all TIFF in a group layer but it does not work:
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = mxd.activeDataFrame
groupName = "New Group Layer-s"
lyrFile = "G:\work insar\1402mehr1402\LAYER\Mahad2.lyr"
allLayers = arcpy.mapping.ListLayers(mxd, groupName, df)[0]
for layer in allLayers:
arcpy.ApplySymbologyFromLayer_management(layer, lyrFile)
layer.visible = "True"
arcpy.RefreshActiveView()