|
|
|
|
|
WLanguage procedure called by SCPSendFile WLanguage procedure ("callback") called by SCPSendFile when transferring files to a remote host using the Secure Copy Protocol (SCP). This procedure gets the progress of the file transfer to the remote host.
sessionSSH is sshSession
sessionSSH.Address = "monserveur.com"
sessionSSH.Port = 22
sessionSSH.User = "username"
sessionSSH.UserPassword = "password"
sessionSSH.ConnectionTimeout = 2 s
sNomFichier is string = "compta_janvier.docx"
sCheminFichierLocal is string = fExeDir() + [fSep()] + sNomFichier
sCheminFichierDistant is string = "~/compta/" + sNomFichier
IF NOT SCPSendFile(sessionSSH, sCheminFichierLocal, ...
sCheminFichierDistant, Progression) THEN
Error(ErrorInfo(errFullDetails))
ELSE
Info("Envoie terminé")
END
INTERNAL PROCEDURE Progression(nTailleTotale, nTailleEnCours)
Trace(nTailleEnCours + "/" + nTailleTotale)
END
Syntax
SCPSendFile_Callback(<Total size> , <Size sent>)
<Total size>: Integer Total size (in bytes) of the file to send. <Size sent>: Integer Bytes sent.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|