Results 1 to 3 of 3

Thread: Download your Files from your Space

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2007
    Posts
    140

    Download your Files from your Space

    Hi Guy's

    I have the below code to Download some files from mentioned Space to your PC
    Code:
    Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
    
    Private Sub Command1_Click()
    
    lngRetVal = URLDownloadToFile(0, "http://www.XXX.com/File1.zip", "C:\file.zip", 0, 0)
    
    End Sub
    My question is : In my space "www.XXX.com"

    I have many files as the following

    file1
    file2
    file3
    file4

    I want to put some options in the form as the below what's the file I want to download it



    How to can I get my idea , Pls your kind advice

    I hope to get my point

  2. #2
    Fanatic Member
    Join Date
    May 2005
    Posts
    528

    Re: Download your Files from your Space

    try this:

    Code:
    Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
    
    Private Sub Command1_Click()
    
    lngRetVal = URLDownloadToFile(0, "http://www.XXX.com/" & text1.text, C:\file.zip", 0, 0)
    
    End Sub
    just type the filename in the textbox like file1.zip and click the button
    Last edited by killo; Jan 18th, 2008 at 05:44 PM.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2007
    Posts
    140

    Re: Download your Files from your Space

    Thanks is working

    lngRetVal = URLDownloadToFile(0, "http://www.XXX.com/" & text1.text, "C:\file.zip", 0, 0)
    Last edited by alkater; Jan 18th, 2008 at 06:10 PM.

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