Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No macro expansion in COPY FILE ???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00212150
Message ID:
00212153
Views:
27
>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
> COPY FILE &lcFile TO &lcDestDir
>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.

try this

lcDestDir = "D:\MyDir\"
SCAN
lcFile = File_Name && from the table
lcsayit='Copy File '+lcfile+' to '+lcdestdir
&lcsayit
ENDSCAN


HTH
Jeff

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform