Results 1 to 6 of 6

Thread: File status thru FTP

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    10

    Question

    Hi all:
    What I'm trying to do is get the file size of a file and kinda build a status bar off of it. That way i can track the progress of the file as it downloads. Hope this make sense.

    thx in advance

  2. #2

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    10
    somebody's got to know this. I can get the bytes as they are coming in but i cant get the total before i start the download.

    thx again in advance
    jre

  3. #3
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123
    If you using INET controls, try this way:

    Public Sub FtpGetFile()

    Inet1.Execute , "GET Test.exe C:\Temp\Test.exe"

    FileTransfer

    End Sub

    Public Sub FileTransfer()

    'ProgressBar1.Max = 320000
    ProgressBar1.Value = 0.05

    Do While Inet1.StillExecuting

    If ProgressBar1.Value < ProgressBar1.Max - 1 Then
    ProgressBar1.Value = ProgressBar1.Value + 0.05
    End If

    DoEvents

    Loop

    ProgressBar1.Value = ProgressBar1.Max

    End Sub

    -Dj4

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    10

    Question

    Dj4, I have that part of it but what im trying to do is have a progress bar and filesize count at the same time.

    for ex.

    file size on the server is 100k
    that will be the progressbar1.max = 100k/byte (which ever)
    and as it downloads it will tell me bytes received

    hope this makes a little more sense

    thx again in advance

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    10

    Angry File Status thru FTP

    Hi all i had this post a while back and i was hoping that someone could give me a hand.

    The steps that dj4 gave me are great and all but i'm trying to get the size of a file from a server.
    Ex.

    Server File = xxxx.exe 1658 (file size)

    What i want to do is take that file size and make it my progressbar.max.

    if anybody doesnt understand any part of this just let me know and i will try to clarify it for ya.

    thx in advance

  6. #6
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123
    HI

    You can try also this sample, but I don't like it that because this is not working automatically. I meen user have to tell where he/she want to put file.

    Look here:
    http://www.mvps.org/vbnet/code/netwo...ledownload.htm

    - Dj4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width