Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy to
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Divers
Thread ID:
00491906
Message ID:
00491941
Vues:
9
>When issuing the copy to command to export a table FPW also includes a CHR(26) at the end of the file. How can I remove this file after exporting.
>I tried the following:
>- importing the file into a memo field and exporting it again
>- importing the file into a memo field issuing a strtran (the file is very big)
>- using modify command nowait and using the keyboard function to move the end of the file and to remove the last character
>
>The last works fine in the development mode. When in the runtime it doesn't work. Is there an other way to do this. Please be aware I'm running FPW26 so it has to be done with its possiblities...
>
>Thanks in advance,
>
>Ron Brahma
>
>The code looks as follows:
>modi comm c:\temp\test.txt nowait
>activate window test
>keyboard '{ctrl+end}'
>keyboard '{BACKSPACE}'
>keyboard '{BACKSPACE}'
>keyboard '{ctrl+W}'


To do it programtically try making the first copy to a temp file and then
	nHandle = FOPEN("tempfile.txt")
	nLen = FSEEK(nHandle,-1,2)
	= FSEEK(nHandle,0,0)
	cText = FREAD(nHandle,nLen)
	nWrite = FCREATE("realfile.txt")
	=FWRITE(nWrite,cText)

	=FCLOSE(nHandle)
	=FCLOSE(nWrite)
	DELE FILE tempfile.txt
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform