Jump to content
Sign in to follow this  

Ftp Upload + Progress Bar

Recommended Posts


Hi everyone, sorry for my language, i'm french,

I use ftp fonction, it's work very fine, but i would like a progress bar when i upload a file, I can't find any script that is. Thanks

This is my code

Func UploadUS($where)

    ConsoleWrite($fileup & " - " & $where & @CR)
    GuiCtrlSetState($send, $GUI_SHOW)
    $dllhandle = DllOpen('wininet.dll'); Opens the DLL
    $Open = _FTPOpen('logs', 0); Starts up FTP services

    $Conn = _FTPConnect($Open, $server, $username, $pass, 21);,1, 0x08000000,0)
    if @error then
        msgbox(0,"Erreur","Erreur de connexion FTP")

    $Ftpp = _FtpPutFile($Conn, $fileup, '/web/US/' & $where); Puts notepad into /somedir/ named as example.exe on your server
    If $Ftpp = 0 Then
        MsgBox(0, "Erreur", "Echec de l'envoi")

    GuiCtrlSetState($send, $GUI_HIDE)
    MsgBox(0, "Rapport d'envoi", "Fichier envoyé avec succès !")

Share this post

Link to post
Share on other sites

You have to use InternetWriteFile :mellow: I made an UDF out of it here: http://www.autoit.de/index.php?page=Thread&postID=48393

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post

Link to post
Share on other sites

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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.