Jump to content
Fivewin Brasil

escolher caminho onde será salvo o arquivo gerado pelo sistema (.TXT.DEC, ETC.)


marcioe

Recommended Posts

Amigos boa tarde, 

Nos nossos sistema tem a opção do usuario escolher onde ele deseja salvar os arquivos, Tipo c:\desktop\xx\yy
ou seja ele escolhe onde vai gravar o arquivo (TIPO SINTEGRA, SPEED, ETC.)

Antes eu usava o comando abaixo 

DESTINHO := cGetFile( "DIRF_"+ALLTRIM(T_ANO) + ".DEC","Gravar o Arquivo em",nil,nil,.T.)
LzCopyFile((ORIGEM) , (DESTINHO) )

 

Apos Atualizar o Fivewin 
DESTINHO := cGetFile( ".DEC","Gravar o Arquivo em",["DIRF_"+ALLTRIM(T_ANO) + ".DEC"],CurDir(),.T.,.T.,,,)
    
*cGetFile (<cFileMask>, <cTitle>, [<nDefaultMask>], [cInitialDirectory>], [<lSave>], [<lLongNames>], [<nFlags>], [<cInitialFile>]) -> cNomeArquivo

Nada Feito, devo estar passando algo errado...

Link to comment
Share on other sites

Fiz assim amigo,

DESTINHO :=    cGetFile32( "Declaracao | *.DEC |", "Gravar o Arquivo em" ,0, ("DIRF_"+ALLTRIM(T_ANO) + ".DEC"),.T.,,)   //.t. = Guardar

111111111111111111.jpg?1547487734



mas na hora de gravar não ficou como queria

O ideial seria  assim, ou um nome que eu pre determinar

22222222222222222.jpg?1547488129

 

Link to comment
Share on other sites

Estude este:

// http://fivewin.com.br/index.php?/topic/27501-ajuda-com-cgetfile/

	#include "FiveWin.ch"
	static oWnd
	//----------------------------------------------------------------//
	Function Main()
	
   u_Teste()
	Return Nil
	Function u_Teste()
	   //Local cFile := cGetFile32(,"Selecione o arquivo")
   local cPt := "CUSTOMER.DBF"
   local cFile
   Local cPath, cFileName, cExtension
   Local nBytes := FileSize(cFile)
	   cPath     := "C:\FWH1701\SAMPLES"
   cFileName := "CUSTOMER.DBF"
   // cExtension:= "*.DBF"
	   cFile := cGetFile( "INVENTARIO  | *.DBF", "Exportação ", 1,LFN2SFN(cPath), .T.,.T.,,cPt)
	   /*
   HB_FNameSplit( cFile, @cPath, @cFileName, @cExtension )
	   MsgStop(cPath+Chr(13)+Chr(10)+;                // result: C:\xhb\source\data\
           cFileName+Chr(13)+Chr(10)+;            // result: test
           cExtension+Chr(13)+Chr(10)+;           // result: .dbf
           Str(nBytes,10)+" bytes "+Chr(13)+Chr(10)+;
           Str(nBytes/1024,10)+" K bytes "+Chr(13)+Chr(10)+;
           Str(nBytes/1024/1024,10)+" mb "+Chr(13)+Chr(10))
   */
	Return Nil


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...