>how can we split and merge file (.dbf, .xml etc.) in vfp?
>
>thanks,
>Nap
I will assume that you mean the following: Split a file to pieces, for example 1,000,000 bytes each, to fit on a diskette, to have a reasonable size for e-mail attachments, etc.
To split:
You can read the entire file into a memory variable with FileToStr(), extract the the individual pieces with substr(), and copy those back to disk with StrToFile().
To combine:
Read the individual pieces with FileToStr(), and add them to a new file with StrToFile(). Use the appropriate parameter with StrToFile(), to append to the end of the file instead of overwriting.
HTH,
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)