Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy from exe to windows
Message
From
15/07/2004 14:18:07
 
 
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
00921092
Message ID:
00924834
Views:
28
	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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform