I list of sequential files, some with the same name and different extension. some with different name and same prefix, The natural sort order is the following.
“(‘aaa_001’, ‘zzz’), (‘aaa_002’, ‘zzz’), (‘aaa_003’, ‘zzz’);”)
Dim rst As RecordSet = db.SQLSelect(“SELECT * FROM Files ORDER BY substr(name, 1, 3), ext, substr(name, 5,3);”)
Do Until rst.EOF
Listbox1.AddRow rst.Field(“name”).StringValue, rst.Field(“ext”).StringValue
rst.MoveNext
Loop
[/code]
results in a list box with the rows in the order you wanted.
i figured it out. i need to adjust the substr parameters to match the filename. the problem then is i would need to know the filename before i did the query.