I have the following code and for some reason I can not go back and check for next FC name. This code work great before I added if "os.path.exists()" and if, all files exist in both folders. Please point out what is the problem. Thanks!
import arcpy
from arcpy import env
import os
arcpy.env.overwriteOutput = True
Match_FC=arcpy.GetParameterAsText(0)
Matched=Match_FC[-10:-1]
arcpy.AddMessage
env.workspace =arcpy.GetParameterAsText(1)
output=arcpy.GetParameterAsText(2)
fcList = arcpy.ListFeatureClasses()
for fc in fcList:
if os.path.exists(fc==Matched):
if fc[-10:-1]==Matched:
arcpy.MakeFeatureLayer_management(fc, output,'','','')
pass