Hi Joshua,
Thank you for your quick help.
I tried to delete old three tables and I created the script like the following
import arcpy
arcpy.env.workspace = "\\\\main\\gis_data\\FHRITest.gdb"
Tables = arcpy.ListTables("FHRT_20*")
print(Tables)
old_three = sorted(Tables, reverse=False)[:3]
print ("\n" + "Following are the tables:" + "\n")
print (old_three)
arcpy.Delete_management(old_three, "table")
and the script is throwing the following error
[u'FHRT_20190805_161001', u'FHRT_20190805_161142', u'FHRT_20190805_162929', u'FHRT_20190805_163204', u'FHRT_20190805_163527']
Following are the tables:
[u'FHRT_20190805_161001', u'FHRT_20190805_161142', u'FHRT_20190805_162929']
Traceback (most recent call last):
File "N:\Scripts\DeleteOldTables.py", line 11, in <module>
arcpy.Delete_management(old_three, "table")
File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py", line 4092, in Delete
raise e
RuntimeError: Object: Error in executing tool
It must be very easy for you to resolve the issue.