kapiaba Posted February 25, 2015 Report Share Posted February 25, 2015 Não entendi Willian, assim não funciona: //oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:Cwd("www/teste") // muda o diretorio no FTP Obg. abs. Quote Link to comment Share on other sites More sharing options...
william Posted February 25, 2015 Report Share Posted February 25, 2015 Oscar realmente havia um erro na funcao lista() , quando nao existe nenhum arquivo ou pasta no ftp, ele dava o erro. Pode consertar assim na funcao lista(): .... IF oFTP:Open( cUrl ) aFiles := oFtp:listFiles()*** coloque isso aqui************ if len(aFiles)=0 msgalert("Nenhum arquivo encontrado .") oFTP:Close() return nil endif****************************** cRoot := aFiles[1,1] que vai resolver o erro. quanto ao envio e recebimento, aqui e em todos os meus clientes nunca deu erro. Verifique se o caminho, ususario e senha estao certos. Abra o seu FTP com o filezilla e vai observando o que acontece. Att. William Adami Quote Link to comment Share on other sites More sharing options...
william Posted February 25, 2015 Report Share Posted February 25, 2015 olá Kapi, oFTP:Cwd("/teste") ou simplesmente oFTP:Cwd("teste") deveria funcionar , mas pelo que eu vi tem um bug na TIP.LIB nas versoes antes de abril de 2014. Se alguem tiver uma versao mais recente da tip.lib creio que esse bug ja foi resolvido. Veja o post do Enrico na lista de desenvolvedores do xharbour: 2014-04-27 22:25 UTC+0100 Enrico Maria Giordano <e.m.giordano@...> * source/tip/ftpcln.prg ! reverted the following change: ! fixed Cwd() method, it now sets oUrl:cPath on successEMG att. William Adami Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 25, 2015 Report Share Posted February 25, 2015 Willian, quase... estou com a ultimao versao da TIP.LIB IF Len( aFiles ) > 0 oUrl := tUrl():New( cUrl ) oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:Open(cUrl) // Faltava este comando. cMyPath:="TESTE" oFTP:CWD( cMyPath ) //oFTP:Cwd("teste") // muda o diretorio no FTP oFTP:nConnTimeout := 20000 oFTP:bUsePasv := .T. Veja se voce entende: In the code: cUrl:="ftp://"+cUser+":"+cPass+"@"+cServer oUrl:=tUrl():New(cUrl) oFTP:=tIPClientFtp():New(oUrl,.T.) oFTP:Open(cUrl) cMyPath:="NEWFILES" oFTP:CWD(cMyPath) oFTP:UploadFile(cFile) where: - cUrl does NOT include a path - tUrl():new sets oUrl:cPath to "/" (url.prg line 175) - oFTP:CWD(cMyPath) changes to folder cMyPath AND NOW ASSIGNS cMyPath to oUrl:cPath (ftpcln.prg line 305) - oFTP:UploadFile(cFile) makes another CWD to oUrl:cPath It is actually nonsense to refresh cPath in every CWD, as is making a CWD within UploadFile or other methods. The real solution should be making a one an only CWD when opening the connection if there is a path included in the url, and then let the user dig around folders as needed. Regards Claudio H http://compgroups.net/comp.lang.xharbour/trying-to-fix-tipclientftp-cwd-method/2976673 Abs. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 25, 2015 Report Share Posted February 25, 2015 Nada Willian, nao obedece os comandos. IF Len( aFiles ) > 0 oUrl := tUrl():New( cUrl ) oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:Open(cUrl) // Faltava este comando. cMyPath:="\teste" oFTP:CWD( cMyPath ) //oFTP:Cwd("teste") // muda o diretorio no FTP oFTP:nConnTimeout := 20000 oFTP:bUsePasv := .T. IF oFTP:Open()=.f. usooff="S" MsgStop( "Nao conectou", "Atencao" ) RETURN .F. endif if oFTP:Cwd( cMyPath )=.f. MsgStop( "Nao abriu pasta: "+cMyPath, "Atencao" ) //oFTP:MKD(cMyPath) // Cria o diretorio //return .f. endif oFTP:Cwd(cMyPath) // muda o diretorio oFTP:reset() abs. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 25, 2015 Report Share Posted February 25, 2015 Eu vejo a pasta de boa ..\TESTE, mas ele insiste em colocar em .. abs. Quote Link to comment Share on other sites More sharing options...
aferra Posted February 25, 2015 Report Share Posted February 25, 2015 estou testando ainda, porem veja se resolve cUrl:="ftp://"+cUser+":"+cPass+"@"+cServer + "/teste" Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 25, 2015 Report Share Posted February 25, 2015 estou testando ainda, porem veja se resolve cUrl:="ftp://"+cUser+":"+cPass+"@"+cServer + "/teste" Assim, ele não conecta. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 25, 2015 Report Share Posted February 25, 2015 #include "fivewin.ch" #include "common.ch" #include "tip.ch" #include "xbrowse.ch" #include "Directry.ch" FUNCTION MAIN( cMask ) LOCAL lRet , odlg private os1,ometer,om,arq:="TESTE.TXT " define dialog odlg resource "ftp" title "Meu FTP - William Adami" odlg:lhelpicon:=.f. redefine get oget var arq id 190 of odlg redefine METER ometer var om id 122 of oDlg total 100 ometer:nclrbar := CLR_GREEN redefine say os1 id 200 of odlg redefine button id 101 of odlg action envia(cMask),ometer:set(0),om:=0,ometer:refresh() redefine button id 102 of odlg action recebe(cMask),ometer:set(0) redefine button id 103 of odlg action apaga() redefine button id 104 of odlg action lista() redefine button id 105 of odlg action criadir() redefine button id 106 of odlg action excludir() activate dialog odlg centered RETURN nil Static FUNCTION Envia( cCarpeta ) LOCAL aFiles LOCAL n LOCAL cUrl LOCAL cStr LOCAL lRetorno := .T. LOCAL oUrl LOCAL oFTP LOCAL cUser LOCAL cServer LOCAL cPassword LOCAL cFile := "" LOCAL lElim DEFAULT lElim TO .F. /* // original cServer := "ftp.fumesc.com.br" //change ftpserver to the real name or ip of your ftp server cUser := "adm" // change ftpuser to an valid user on ftpserer cPassword := "123" // change ftppass to an valid password for ftpuser cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer */ cServer := "ftp.pleno.com.br" //change ftpserver to the real name or ip of your ftp server cUser := "pleno" // change ftpuser to an valid user on ftpserer cPassword := "123senha" // change ftppass to an valid password for ftpuser cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer // Leemos ficheros a enviar aFiles := Directory( cCarpeta ) IF Len( aFiles ) > 0 oUrl := tUrl():New( cUrl ) oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:Open(cUrl) // Faltava este comando. cMyPath:="TESTE" // oFtp:CWD( "www" ) oFtp:CWD( ".." ) oFTP:CWD( cMyPath ) ? oFtp:cwd( cMyPath ), oFtp:cReply oFTP:nConnTimeout := 20000 oFTP:bUsePasv := .T. IF oFTP:Open()=.f. usooff="S" MsgStop( "Nao conectou", "Atencao" ) RETURN .F. endif if oFTP:Cwd( cMyPath )=.f. MsgStop( "Nao abriu pasta: "+cMyPath, "Atencao" ) //oFTP:MKD(cMyPath) // Cria o diretorio //return .f. endif // tento de novo, envia, mas nao para \TESTE oFTP:Cwd(cMyPath) // muda o diretorio oFTP:reset() // Comprobamos si el usuario contiene una @ para forzar el userid IF At( "@", cUser ) > 0 oFTP:oUrl:cServer := cServer oFTP:oUrl:cUserID := cUser oFTP:oUrl:cPassword := cPassword ENDIF // function for displaying progress bar oFtp:exGauge := ( @FtpProgress() ) IF oFTP:Open( cUrl ) arq:=alltrim(arq) IF !oFtp:UploadFile( arq ) lRetorno := .F. ELSE lRetorno := .t. ENDIF oFTP:Close() if lRetorno msgalert( "Enviado com sucesso !" ,"OK") else msgstop( "Falha no Envio !" ,"ERRO") endif ELSE cStr := "NÆo consegui conectar com o servidor FTP" + " " + oURL:cServer IF oFTP:SocketCon == NIL cStr += Chr( 13 ) + Chr( 10 ) + "ConexÆo nÆo inicializada" ELSEIF InetErrorCode( oFTP:SocketCon ) == 0 cStr += Chr( 13 ) + Chr( 10 ) + "Resposta do servidor:" + " "+ oFTP:cReply ELSE cStr += Chr( 13 ) + Chr( 10 ) + "Erro na conexÆo:" + " " +InetErrorDesc( oFTP:SocketCon ) ENDIF msgstop( oemtoansi(cStr),"ERRO") ENDIF ENDIF RETURN nil *-**** download STATIC FUNCTION recebe( cCarpeta ) LOCAL aFiles LOCAL n LOCAL cUrl LOCAL cStr LOCAL lRetorno := .T. LOCAL oUrl LOCAL oFTP LOCAL cUser LOCAL cServer LOCAL cPassword LOCAL cFile := "" LOCAL lElim Local ArrayFile := { alltrim(arq) } DEFAULT lElim TO .F. cServer := "ftp.fumesc.com.br" //change ftpserver to the real name or ip of your ftp server cUser := "adm" // change ftpuser to an valid user on ftpserer cPassword := "123" // change ftppass to an valid password for ftpuser cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer oUrl := tUrl():New( cUrl ) oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:nConnTimeout := 20000 oFTP:bUsePasv := .t. IF At( "@", cUser ) > 0 oFTPUrl:cServer := cServer oFTPUrl:cUserID := cUser oFTPUrl:cPassword := cPassword ENDIF // function for displaying progress bar ****oFtp:exGauge := ( @FtpProgress() ) IF oFTP:Open( cUrl ) arq:=alltrim(arq) cTamanho:=oFTP:listfiles(arq) lretorno:=Inicia_Progress(arq,cTamanho[1][2],arq,oftp ) oFTP:Close() if lRetorno msgalert( "Recebido com sucesso !" ,"OK") else msgstop( "Falha no Recebimento !" ,"ERRO") endif ELSE cStr := "NÆo consegui conectar com o servidor FTP" + " " + oURL:cServer IF oFTP:SocketCon == NIL cStr += Chr( 13 ) + Chr( 10 ) + "ConexÆo nÆo inicializada" ELSEIF InetErrorCode( oFTP:SocketCon ) == 0 cStr += Chr( 13 ) + Chr( 10 ) + "Resposta do servidor:" + " "+ oFTP:cReply ELSE cStr += Chr( 13 ) + Chr( 10 ) + "Erro na conexÆo:" + " " +InetErrorDesc( oFTP:SocketCon ) ENDIF msgstop( oemtoansi(cStr),"ERRO") lRetorno := .F. ENDIF return nil STATIC FUNCTION apaga( cCarpeta ) LOCAL aFiles LOCAL n LOCAL cUrl LOCAL cStr LOCAL lRetorno := .T. LOCAL oUrl LOCAL oFTP LOCAL cUser LOCAL cServer LOCAL cPassword LOCAL cFile := "" LOCAL lElim DEFAULT lElim TO .F. cServer := "ftp.fumesc.com.br" //change ftpserver to the real name or ip of your ftp server cUser := "adm" // change ftpuser to an valid user on ftpserer cPassword := "123" // change ftppass to an valid password for ftpuser cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer oUrl := tUrl():New( cUrl ) oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:nConnTimeout := 20000 oFTP:bUsePasv := .t. IF At( "@", cUser ) > 0 oFTPUrl:cServer := cServer oFTPUrl:cUserID := cUser oFTPUrl:cPassword := cPassword ENDIF IF oFTP:Open( cUrl ) arq:=alltrim(arq) IF !oFtp:dele( arq ) lRetorno := .F. ELSE lRetorno := .t. ENDIF oFTP:Close() if lRetorno msgalert( "Apagado com sucesso !" ,"OK") else msgstop( "Falha na Exclusao !" ,"ERRO") endif ELSE cStr := "NÆo consegui conectar com o servidor FTP" + " " + oURL:cServer IF oFTP:SocketCon == NIL cStr += Chr( 13 ) + Chr( 10 ) + "ConexÆo nÆo inicializada" ELSEIF InetErrorCode( oFTP:SocketCon ) == 0 cStr += Chr( 13 ) + Chr( 10 ) + "Resposta do servidor:" + " "+ oFTP:cReply ELSE cStr += Chr( 13 ) + Chr( 10 ) + "Erro na conexÆo:" + " " +InetErrorDesc( oFTP:SocketCon ) ENDIF msgstop( oemtoansi(cStr),"ERRO") lRetorno := .F. ENDIF return nil STATIC FUNCTION criadir( cCarpeta ) LOCAL aFiles LOCAL n LOCAL cUrl LOCAL cStr LOCAL lRetorno := .T. LOCAL oUrl LOCAL oFTP LOCAL cUser LOCAL cServer LOCAL cPassword LOCAL cFile := "" LOCAL lElim DEFAULT lElim TO .F. cServer := "ftp.fumesc.com.br" //change ftpserver to the real name or ip of your ftp server cUser := "adm" // change ftpuser to an valid user on ftpserer cPassword := "123" // change ftppass to an valid password for ftpuser cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer oUrl := tUrl():New( cUrl ) oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:nConnTimeout := 20000 oFTP:bUsePasv := .t. IF At( "@", cUser ) > 0 oFTPUrl:cServer := cServer oFTPUrl:cUserID := cUser oFTPUrl:cPassword := cPassword ENDIF IF oFTP:Open( cUrl ) arq:=alltrim(arq) IF !oFtp:mkd( arq ) lRetorno := .F. ELSE lRetorno := .t. ENDIF oFTP:Close() if lRetorno msgalert( "Diretorio criado com sucesso !" ,"OK") else msgstop( "Falha na Criacao do Diretorio !" ,"ERRO") endif ELSE cStr := "NÆo consegui conectar com o servidor FTP" + " " + oURL:cServer IF oFTP:SocketCon == NIL cStr += Chr( 13 ) + Chr( 10 ) + "ConexÆo nÆo inicializada" ELSEIF InetErrorCode( oFTP:SocketCon ) == 0 cStr += Chr( 13 ) + Chr( 10 ) + "Resposta do servidor:" + " "+ oFTP:cReply ELSE cStr += Chr( 13 ) + Chr( 10 ) + "Erro na conexÆo:" + " " +InetErrorDesc( oFTP:SocketCon ) ENDIF msgstop( oemtoansi(cStr),"ERRO") lRetorno := .F. ENDIF return nil STATIC FUNCTION excludir( cCarpeta ) LOCAL aFiles LOCAL n LOCAL cUrl LOCAL cStr LOCAL lRetorno := .T. LOCAL oUrl LOCAL oFTP LOCAL cUser LOCAL cServer LOCAL cPassword LOCAL cFile := "" LOCAL lElim DEFAULT lElim TO .F. cServer := "ftp.fumesc.com.br" //change ftpserver to the real name or ip of your ftp server cUser := "adm" // change ftpuser to an valid user on ftpserer cPassword := "123" // change ftppass to an valid password for ftpuser cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer oUrl := tUrl():New( cUrl ) oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:nConnTimeout := 20000 oFTP:bUsePasv := .t. IF At( "@", cUser ) > 0 oFTPUrl:cServer := cServer oFTPUrl:cUserID := cUser oFTPUrl:cPassword := cPassword ENDIF IF oFTP:Open( cUrl ) arq:=alltrim(arq) IF !oFtp:rmd( arq ) lRetorno := .F. ELSE lRetorno := .t. ENDIF oFTP:Close() if lRetorno msgalert( "Diretorio Apagado com sucesso !" ,"OK") else msgstop( "Falha na Exclusao do diretorio !" ,"ERRO") endif ELSE cStr := "NÆo consegui conectar com o servidor FTP" + " " + oURL:cServer IF oFTP:SocketCon == NIL cStr += Chr( 13 ) + Chr( 10 ) + "ConexÆo nÆo inicializada" ELSEIF InetErrorCode( oFTP:SocketCon ) == 0 cStr += Chr( 13 ) + Chr( 10 ) + "Resposta do servidor:" + " "+ oFTP:cReply ELSE cStr += Chr( 13 ) + Chr( 10 ) + "Erro na conexÆo:" + " " +InetErrorDesc( oFTP:SocketCon ) ENDIF msgstop( oemtoansi(cStr),"ERRO") lRetorno := .F. ENDIF return nil STATIC FUNCTION lista( cCarpeta ) LOCAL aFiles LOCAL n LOCAL cUrl LOCAL cStr LOCAL lRetorno := .T. LOCAL oUrl LOCAL oFTP LOCAL cUser LOCAL cServer LOCAL cPassword LOCAL cFile := "" LOCAL lElim local obrw,od1 DEFAULT lElim TO .F. cServer := "ftp.fumesc.com.br" //change ftpserver to the real name or ip of your ftp server cUser := "adm" // change ftpuser to an valid user on ftpserer cPassword := "123" // change ftppass to an valid password for ftpuser cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer oUrl := tUrl():New( cUrl ) oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:nConnTimeout := 20000 oFTP:bUsePasv := .t. IF At( "@", cUser ) > 0 oFTPUrl:cServer := cServer oFTPUrl:cUserID := cUser oFTPUrl:cPassword := cPassword ENDIF IF oFTP:Open( cUrl ) aFiles := oFtp:listFiles() *** coloque isso aqui************ if len(aFiles)=0 msgalert("Nenhum arquivo encontrado .") oFTP:Close() return nil endif ****************************** cRoot := aFiles[1,1] oFTP:Close() define dialog od1 resource "lista" REDEFINE XBROWSE oBrw ID 101 OF od1 obrw:l2007:=.t. * tipo array oBrw:nDataType:=1 obrw:setarray( afiles , .t. ) obrw:acols[1]:cheader:=oemtoansi("Nome") obrw:acols[2]:cheader:=oemtoansi("Tamanho") obrw:acols[3]:cheader:=oemtoansi("Data") obrw:acols[4]:cheader:=oemtoansi("Hora") oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW oBrw:nRowDividerStyle := LINESTYLE_BLACK oBrw:nHeaderLines := 1 oBrw:nDataLines := 1 obrw:nRowHeight:= 20 obrw:nHeaderHeight:= 20 activate dialog od1 centered ELSE cStr := "NÆo consegui conectar com o servidor FTP" + " " + oURL:cServer IF oFTP:SocketCon == NIL cStr += Chr( 13 ) + Chr( 10 ) + "ConexÆo nÆo inicializada" ELSEIF InetErrorCode( oFTP:SocketCon ) == 0 cStr += Chr( 13 ) + Chr( 10 ) + "Resposta do servidor:" + " "+ oFTP:cReply ELSE cStr += Chr( 13 ) + Chr( 10 ) + "Erro na conexÆo:" + " " +InetErrorDesc( oFTP:SocketCon ) ENDIF msgstop( oemtoansi(cStr),"ERRO") lRetorno := .F. ENDIF return nil // Displays a progress bar during file upload/download STATIC FUNCTION FtpProgress( nSent, nTotal, oFtp ) LOCAL cProgress cProgress := Int( 100*nSent/nTotal ) ometer:set(cProgress ) os1:settext(oFtp:oUrl:cFile) RETURN .T. ************************************************* Function Inicia_Progress(fdestino,wTotal,ftpfile,oftp) ************************************************* local vol oFtp:exGauge := { | done, size| ShowGauge(done, size, wTotal, ftpfile ) } if !oFtp:DownLoadFile(fdestino) vol:=.f. else vol:=.t. endif return vol **************************************************** Procedure ShowGauge( nSent, nSize, wTotal, ftpfile ) **************************************************** IF nSent > 0 * os1:settext( "Arquivo...: " +ftpfile+" "+ STR(nSent)+" Byts de: " + str(wTotal)+ " Byts "+str((nSent/wTotal)*100,4) +" %" ) cProgress := Int( (nSent/wTotal)*100 ) ometer:set(cProgress ) os1:settext(ftpfile) ENDIF RETURN Quote Link to comment Share on other sites More sharing options...
Theotokos Posted February 25, 2015 Report Share Posted February 25, 2015 Nada Willian, nao obedece os comandos. IF Len( aFiles ) > 0 oUrl := tUrl():New( cUrl ) oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:Open(cUrl) // Faltava este comando. cMyPath:="\teste" oFTP:CWD( cMyPath ) //oFTP:Cwd("teste") // muda o diretorio no FTP oFTP:nConnTimeout := 20000 oFTP:bUsePasv := .T. IF oFTP:Open()=.f. usooff="S" MsgStop( "Nao conectou", "Atencao" ) RETURN .F. endif if oFTP:Cwd( cMyPath )=.f. MsgStop( "Nao abriu pasta: "+cMyPath, "Atencao" ) //oFTP:MKD(cMyPath) // Cria o diretorio //return .f. endif oFTP:Cwd(cMyPath) // muda o diretorio oFTP:reset() abs. Ja tentou assim : oFTP:Cwd("teste") sem a barra ou com a barra inversa? kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 25, 2015 Report Share Posted February 25, 2015 Sim, Theotokos Quote Link to comment Share on other sites More sharing options...
oribeiro Posted February 27, 2015 Author Report Share Posted February 27, 2015 Se quiserem testar a função que eu passei acima, ela funciona perfeitamente para tudo. Só estou com problema de intermitência com o LocalWeb. Não sei se é TimeOut ou algum outro parâmetro. Em alguns clientes funciona e em outros não. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 27, 2015 Report Share Posted February 27, 2015 Oscar, você compilou com o que. Harbour ou xHarbour? Com xHarbour, eu não consigo trocar a pasta com comando oFtp:CWD( "/TESTE" ) por execmplo. Perguntei ao Enrico, e ele disse que funciona normal. Mas acho que ele compila com HARBOUR. http://forums.fivetechsupport.com/viewtopic.php?f=3&t=30251 Abs. Quote Link to comment Share on other sites More sharing options...
william Posted February 28, 2015 Report Share Posted February 28, 2015 olá Kapiaba , testei de tudo que é jeito e pelo que eu percebi está com bug no Method UploadFile() por isso não grava o arquivo na pasta corretamente. Se vc testar dando o comando cwd("trab") e depois o comando list("trab") ele mostra o conteudo da pasta trab corretamente. Agora na funcao uploadfile() só grava na pasta raiz do ftp. Como eu sempre gravei na pasta raiz do ftp, nunca tinha percebido este bug.... William Quote Link to comment Share on other sites More sharing options...
aferra Posted February 28, 2015 Report Share Posted February 28, 2015 pedi para parar parou. kkkkkkkkkkkkkkkkk cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer + "/BACKUP/" agora sim Kapi...precisava colocar desta maneira...não tem nada haver estar em caixa alta Quote Link to comment Share on other sites More sharing options...
evandro Posted February 28, 2015 Report Share Posted February 28, 2015 Olá, O meu problema é que mudaram a porta. Não é mais a padrão ( 21 ). Como fazer para mudar? Na url não pede a porta. Quote Link to comment Share on other sites More sharing options...
aferra Posted February 28, 2015 Report Share Posted February 28, 2015 Olá Evando tente assim oFTP := tIPClientFtp():New( oUrl, .T. ) oFTP:nDefaultPort := 21 <-coloque a sua porta.... Quote Link to comment Share on other sites More sharing options...
evandro Posted February 28, 2015 Report Share Posted February 28, 2015 Olá, Matou a pau! Obrigado! Quote Link to comment Share on other sites More sharing options...
william Posted March 1, 2015 Report Share Posted March 1, 2015 beleza Alessandro , colocando a pasta destino na url , aqui funcionou certinho. Obrigado William Adami Quote Link to comment Share on other sites More sharing options...
aferra Posted March 2, 2015 Report Share Posted March 2, 2015 ainda em estudo, mas apanhando demais da conta....rsrsrsrsrs...não tem material e os exemplos são bem simples...mas vamos que vamos...tendo mais novidades colocarei aqui como estou fazendo com o xharbour... kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 13, 2015 Report Share Posted March 13, 2015 Caracas, só eu não consigo acessar uma pasta do FTP? Dentro do FTP, tem WWW e dentro deste WWW, tem várias sub pastas, onde ficam os programas dos clientes, por exemplo, tenho as pastas de testes, TEST, TESTE, TESTE2 Não consigo faze-lo conectar em nenhuma das pastas, o que estou fazendo errado? obg. abs. Quote Link to comment Share on other sites More sharing options...
aferra Posted March 13, 2015 Report Share Posted March 13, 2015 estas fazendo assim? cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer + "/BACKUP/" kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 13, 2015 Report Share Posted March 13, 2015 cUrl := "ftp://" + cUser + ":" + cPassword + "@" + cServer + "/TESTE2/" Quote Link to comment Share on other sites More sharing options...
aferra Posted March 13, 2015 Report Share Posted March 13, 2015 por acaso esta pasta está dentro do www??? se for ainda não consegui tambem... kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 13, 2015 Report Share Posted March 13, 2015 por acaso esta pasta está dentro do www??? se for ainda não consegui tambem... SIM, minha flor de LIZ!! kkkkkkkkkkkkkkkkkkkkkkkkk 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.