The FileToStr() function should work.
StrToFile( FileToStr(testfile1), "c:\thefinal.mgk")
>I've recently upgraded to VFP 6.0 SP3 or 5 (whatever is the latest one) and my code that used to work to copy an embedded binary file from within my exe to the users's local hard disk no longer works. Here's the simple code:
>
>myexedir=left(sys(16),rat("\",sys(16)))
>testfile1=myexedir+"mypref.mgk"
>if file(testfile1)
>
>* this code says "file mypref.mgk does not exist although file said it existed earlier and it is embedded in the exe - checked the project file and made sure that it was included)
>
>copy file (testfile1) to ("c:\thefinal.mgk")
>endif
>
>Anyone have any ideas? I need help on this one ASAP - seems to be the only bug I have in the move from VFP 3 to 6.
>
>From: Ed Johnson
--sb--