Rebuilding corrupted dbase indexes (D1.0)

How do I do this? I have a client who's hard drive seems to be on the
way out and corrupts files regulary!

I know about dbiregenindexes, but if it's badly corrupted I can't open
the table to call this. Database Desktop has the ability to to detach
index if it can't work it out.  I'd like to be able to do the same via