PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Example: Transferring a file and managing a progress bar
  • Example: Transferring a directory to the root of an FTP account and managing a progress bar
  • Example: Transferring a file and managing a progress bar (WINDEV Mobile)
Example: Transferring a file and managing a progress bar
Example: Transferring a directory to the root of an FTP account and managing a progress bar
Example: Transferring a file and managing a progress bar (WINDEV Mobile)
Windows Mobile
This example is used to send a file from the current computer (Mobile) to the FTP server. The Transfer_Progress procedure is used to manage the progress of the transfer in the current window, displayed on the current computer.
nConnection is int
nConnection = FTPConnect("ftp.cdrom.com", "GUEST", "")

IF FTPSend(nConnection, "\autoexec.bat", "/autoexec.tmp", "Transfer_Progress") = False THEN
Info("The transfer failed")
END
// -- ProgBar_Transfer procedure: managing the current transfer
PROCEDURE Transfer_Progress(nTotal, nCurrent)
Message("Transfer in progress...")
ProgressBar(nCurrent, nTotal)
// Is the transfer completed?
IF nCurrent = nTotal THEN
Message("Transfer completed")
Info("Transfer completed")
END
RESULT True
Minimum version required
  • Version 9
This page is also available for…
Comments
FTPSEND
s_arquivo_endereco_local is string=ftp_conf.endereco_local+TABLE_local.COL_nome_arquivo // "d:\erpmatos\Atualizacao\matosnfe.jpg"
s_arquivo_endereco_remoto is string=ftp_conf.endereco_remoto+TABLE_local.COL_nome_arquivo // "/web/_Windev_Erp_matos/matosnfe.jpg"
// TRANSFERENCIA
IF FTPSend(n_conexao,s_arquivo_endereco_local,s_arquivo_endereco_remoto,_transferencia) = False THEN
Info("erro transferencia")
END
// TRANSFERENCIA
// ESSA PROCEDURE ESTA LINKADA AO FTPSEND
PROCEDURE _transferencia(nTotal, nCurrent)
Gauge(nCurrent,nTotal) // vai gerar uma barra de progresso status
// tem de estar com status de mensagem na windows ativa
RESULT True
De matos AMARILDO
04 Jan. 2016