Hello everyone,
I am hoping to gain a better understanding of how arcpy.Exists() interprets an ArcGIS Server (.ags) connection file (currently using ArcGIS Pro 2.8.1)
After some testing, including the .ags file extension within the string variable will return False while excluding it will return True.
Examples:
import arcpy
test01 = arcpy.Exists("C:\\Path\\To\\Connection\\sample_ags_file.ags")
print(test01)
False
test02 = arcpy.Exists("C:\\Path\\To\\Connection\\sample_ags_file")
print(test02)
True
Could someone enlighten me as to why the .ags extension returns False? Or is it bad practice to use arcpy.Exists() when attempting to verify the existence of .ags files? I appreciate any clarification!