Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No macro expansion in COPY FILE ???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00212150
Message ID:
00212155
Vues:
23
Try this: COPY FILE (lcFile) TO (lcDestDir). Using parenthises instead of macro expansion is much faster and it will generally work any time VFP is expecting a file name or directory.

>Hello everyone,
>
>I'm implementing a batch download program in VFP 6 so I can store, delete, and update the files to be downloaded in a table. I'm having difficulty with the COPY FILE command within a SCAN...ENDSCAN loop.
>
>lcDestDir = "D:\MyDir\"
>SCAN
> lcFile = File_Name && from the table

>ENDSCAN
>
>No dice. I get the error: "File [current directory]\&lcFile does not exist." I tried enclosing the variables in parentheses as well, with the same error. Am I missing something, or does macro expansion simply not work with COPY FILE? (The docs are mum on the subject).
>
>TIA,
>-Bernie Falor
>Database Analyst
>Library Video Co.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform