>local hFile, hIn, lcRead, Written >With thisform > hFile = FtpOpenFile(.hConnection, ; > trim(.txtRemoteFile.Value), GENERIC_WRITE, ; > .optTransferMode.Value, 0) > If hFile = 0 > .FTPResponse("FtpOpenFile error.") > Return > Endif > .ProgBar.Value = 0 > hIn = fopen(.txtLocalFile.Value) > .ProgBar.Max = fseek(hIn,0,2) > =fseek(hIn,0,0) > .FTPResponse('Transferred '+trans(0)+' of '+trans(.ProgBar.Max)+' bytes.') > Do while !feof(hIn) > Written = 0 > lcRead = fread(hIn,100) > If InternetWriteFile(hFile, lcRead, len(lcRead), @Written) = 0 > .FTPResponse("InternetWriteFile error.") > Return > Endif > .ProgBar.Value = min(.ProgBar.Value+Written,.ProgBar.Max) > .FTPResponse('Transferred '+trans(.ProgBar.Value)+' of '+trans(.ProgBar.Max)+' bytes.' ) > Enddo > =fclose(hIn) > InternetCloseHandle(hFile) >Endwith >Codes I'm pasting are from a 'test' FTP form. I actually started to build it when I had trouble with timeouts, loginname, pwd with existing FTP utils left for upload\dnload during night (and OCX never worked for me). It could never finish from a UI point but ended my suffers with FTP. Might tidy it up and upload one day.