Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seeking Alternative to COPY FILE Command
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00444304
Message ID:
00444331
Views:
22
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform