Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy File command

Status
Not open for further replies.

MaryG

Programmer
Mar 26, 2001
26
AU
Hi,

Does anyone know if you can use a variable for the file name when using the VFP COPY FILE command? I see how you can use it by hardcoding the actual filename you are copying from and to, but is there any way to use it or another command if you want the filename you are copying from and to to be a variable that is determined by the program?

I appreciate any help anyone can offer.


Thanks
Mary
 

Perhaps this.

Code:
lcFileOrig = 'c:\myfile.txt'
lcFileDest = 'd:\myfile.bck'
COPY FILE (lcFileOrig) to (lcFileDest)




Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks so much Mike. I looked through the documentation and couldn't figure out that you had to put it in parentheses!

Your help is much appreciated.
Mary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top