Hello Esgiciesgici wrote:Hola Mustafamustafa wrote: I changed "Save a txt" is not taken TXT extension to write it only put the name of the file, the bad news is that if you keep on top of an existing file.txt is created with the same double extension such document.txt.txt
Please try to adding
to Procedure TextoGraba betweenCode: Select all
IF "." $ Cfile CfileD := Cfile ELSE CfileD := Cfile+".txt" ENDIF
cContenido := Frm_1.Edit_1.value
and
SetCurrentFolder( cPrgFolder )
Saludos
--
Esgici
I think it must run well
*-------------------------------*
Procedure TextoGraba
Cfile:=putfile({{'txt','*.txt'},{'Configuracion','*.ini'}},"Grab\arArchivo")
cContenido := Frm_1.Edit_1.value
IF "." $ Cfile
CfileD := Cfile
ELSE
CfileD := Cfile+".txt"
ENDIF
SetCurrentFolder( cPrgFolder )
IF MEMOWRIT(CFileD,cContenido,.T.)
ELSE
msginfo("No se pudo grabar el archivo ","ATENCION !!!")
RETURN
ENDIF
Frm_1.Edit_1.value:=" "
SAVE TO memuar ALL LIKE cFileD*
Convierte()
RETURN
*-------------------------------------*
testing your code does not touch but showed an error and SDF
was created with a single empty file extension. TXT nameless,
I do not see this error again
Date:22/05/2009 Time: 18:10:37
Error SDF/1001 Open error: .txt.txt (DOS Error 2)
Called from __DBAPP(0)
Called from __DBSDF(0)
Called from CONVIERTE(266)
Called from TEXTOGRABA(246)
Called from (b)MAIN(115)
Called from _DOCONTROLEVENTPROCEDURE(4394)
Called from EVENTS(1274)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4083)
Called from MAIN(158)
thanks for everything
Mustafa