Jump to content

Recommended Posts

Posted

$FTPOpen = _FTP_Open($FTPName)
    ConsoleWrite("Status + "&$FTPOpen&@CRLF)
    ConsoleWrite("Wait Connection to " & $FTPServer & "..."&@LF)

$FTPConnect = _FTP_Connect($FTPOpen, $FTPServer, $User, $Pass, $iPassive, $iPort)
    ConsoleWrite($FTPOpen & " + " & $FTPServer & " + " & $User & " + " & $Pass & @LF)

$FTPUpload = _FTP_DirPutContents($FTPConnect, $InstallFolder, $FTPlocation, 1, 0)
    ConsoleWrite($FTPConnect & " + From " & $InstallFolder & " + To " & $FTPlocation & @LF)

Example()
_FTP_Close($FTPOpen)

I would like to add a progress bar in my FTP upload.

Sorry, I had read the help but I could not make it work, could someone help me please?

Posted

 

Sorry, I had read the help but I could not make it work

Can you show us what you have tried with _FTP_ProgressUpload?

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Posted

this

Can you show us what you have tried with _FTP_ProgressUpload?

Everything is working, but the line of progress is invisible, I read only the names of files loaded during the loop... Where I went wrong.

I adapted the example in the help.._FTP_ProgressUpload

Global $g_sLocalFile = _FileListToArray("D:\img\","*jpg",1)
Global $g_sLocalFile2 = UBound($g_sLocalFile) -1
Global $g_sRemoteFile = "/Public/"
...
...
...
and the nmy loop

Func Example()
    Local $sFunctionToCall = "_UpdateProgress"
    
    For $i = 1 To $g_sLocalFile2
       ProgressOn("Upload Progress","File uploaded: "&$g_sLocalFile[$i])
          _FTP_ProgressUpload($hFTPSession, $g_sLocalFile[$i], $g_sRemoteFile&$g_sLocalFile[$i], $sFunctionToCall)
    Next
   ProgressOff()

EndFunc   ;==>Example

.....

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...