Declare Integer GetSystemDirectory In Kernel32.Dll ;
STRING @lpBuffer, Integer lnSize
lcFolder = Space(255)
lnLength = GetSystemDirectory(@lcFolder,255)
If lnLength>0
lcFolder = Left(lcFolder,lnLength)
Endif
ExtractFile("MYFILE.TXT",lcFolder)
It will looking for "MYFILE.TXT" in table stored in EXE and extract it to WindowsSystemDirectory.
Denis
>I have some understand like this.
>We get the file and replace the file name and relpace in memo ban.
>
>i am usderstading from your codes. after replacing the file in memo(table). i have not need now such file. now this file is copy in the dbf. now i am going to coping where i want to.
>But i check there is no current file is presant in folder.
>How i can change the folder where i am going to extrecing. i want to copy this file in c:\windows\system32.
>thanks for your more help
>but extrraction file function still in trouble for me.
>
>4-5-6) Some code to extract file
>
>Function ExtractFile(tcFilename As String, tcDestPath As String)
> LOCAL lcDestFilename
> IF !USED("curFileStore")
> USE curFileStore IN 0
> ENDIF
> SELECT curFileStore
> LOCATE ALL FOR mFilename=tcFilename
> lcDestFilename = ADDBS(tcDestPath)+tcFilename
> STRTOFILE(curFileStore.mFilename,lcDestFilename)
> Return(FILE(lcDestFilename))
>Endfunc