Jump to content

Ftp Upload + Progress Bar


Flop
 Share

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")
    EndIf

    $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")
    Endif

    GuiCtrlSetState($send, $GUI_HIDE)
    MsgBox(0, "Rapport d'envoi", "Fichier envoyé avec succès !")
   
EndFunc
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...