Batch export sequence

Hi! I used a python script to batch exported 1000 obj files and I wonder when I do this script, whether it has a specific sequence or it’s randomly exported. I’m asking because I want to map the objects back with batch importing. Is it possible to find which object is with which indexes?
For batch export I use

objs = rs.AllObjects()
for i in range(len(objs)):
        obj = objs[i]
        filepath = dir + "/exported" + str(i) + ".obj"
        rs.SelectObject(obj)
        rs.Command("!_-Export \"" + filepath + "\" -Enter -Enter")

for batch import I use

for filepath in files:
        index = filepath .split('exported')[1].split('.')[0]
        rs.Command('_-Import ' + filepath + ' _Enter')

So the exported file has the same index as the imported file. But I couldn’t find out how to relate this index to the object SID or anything I can identify in rhino/grasshopper.
A second look I guess I’m asking when I select everything with objs = rs.AllObjects() does rhino has a sequential coding for this selection.

Hello- - on import, I suppose you could track the file name (i.e. the index) and the object id for each and store those someplace, in sc.Sticky, or as user text. But I am not really sure what you are after, I guess…

AllObjects() will, I think, just look in the object table and run down the list- the actual order of objects is last-modified at the top of the list.

-Pascal