>I need to copy DBFs / CDXs / FPTs from one directory to another (for backup purposes). The VFP command COPY FILE fails if the table is open. I am currently shelling to DOS and using the COPY command (in DOS) which works even when the table is open, but I would rather not shell out to DOS. Are there any alternatives? I also don't want to resort to ActiveX controls.
> Thanks, Chaim
I ran into this sometime ago. My biggest culprit was foxuser.dbf. What I ended up doing was using ADIR() to get a list of dbf files, I would cycle through this and remove the file references that I did not want and then cycle through again to copy the files that remained referenced in the array. I would then repeat this for cdx and fpt files. Not the perfect solution--you have to know which files are going to be open and therefore excluded--but I couldn't come up with anything else.
HTH,
George
Everything we see or seems
Is but a dream within a dream - Edgar Allen Poe