marcioe Posted January 14, 2019 Report Share Posted January 14, 2019 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... Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 14, 2019 Report Share Posted January 14, 2019 http://forums.fivetechsupport.com/viewtopic.php?f=3&t=36234&p=216104&hilit=cGetFile#p216104 Quote Link to comment Share on other sites More sharing options...
marcioe Posted January 14, 2019 Author Report Share Posted January 14, 2019 Fiz assim amigo, DESTINHO := cGetFile32( "Declaracao | *.DEC |", "Gravar o Arquivo em" ,0, ("DIRF_"+ALLTRIM(T_ANO) + ".DEC"),.T.,,) //.t. = Guardar mas na hora de gravar não ficou como queria O ideial seria assim, ou um nome que eu pre determinar Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 14, 2019 Report Share Posted January 14, 2019 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 Quote Link to comment Share on other sites More sharing options...
marcioe Posted January 14, 2019 Author Report Share Posted January 14, 2019 Desta forma deu cetinho.... Obrigado... cPt := ("DIRF_"+ALLTRIM(T_ANO) + ".DEC") DESTINHO := cGetFile( "Declaração | *.DEC", "Exportação ", 1,LFN2SFN(ORIGEM), .T.,.T.,,cPt) LzCopyFile((ORIGEM) , (DESTINHO) ) kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 15, 2019 Report Share Posted January 15, 2019 Onde está escrito: DESTINHO, quisestes dizer: DESTINO é isto? DESTINHO := cGetFile( "Declaração | *.DEC", "Exportação ", 1,LFN2SFN(ORIGEM), .T.,.T.,,cPt) Quote Link to comment Share on other sites More sharing options...
marcioe Posted January 15, 2019 Author Report Share Posted January 15, 2019 CORRETO Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.