My app deals with files from a 3rd party app.
I have a routine that renames tables (files) from the 3rd party app - there are many of them in a relational database.
For years I have had a routine starting..
Code:
For lnFile = 1 To Adir(laFiles, '*.*')
lclength = Atc('_',laFiles[m.lnFile,1])-1
... then further processing
The _ is significant in the naming of the 3rd party app tables.
By chance I have attempted to change an original name (with an _ ) with another name actually containing an underscore.
Eg OLETEST_c.DBF(_) into mynew_test_c.dbf
The above lclength code gives me the position of the first _ rather than the one that is always some chrs back from the period.
To complicate matters the _c part may be _cc or _ccc.
I really need to change the lclength test to reflect the last _ before .dbf.
Could someone help with the definition of an ATC function please?