Results 1 to 8 of 8

Thread: FTP File

  1. #1
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    I often need to go on to a particular FTP Website and copy the file/s into a directory called C:/downloads

    It would be appreciated if someone could provide me with the code to copy the file from the FTP site into the directory C:/downloads or to import the file from the FTP site into Excel

    You can use a dummy FTP site, user name & password and I will amend these using the correct FTP site, user name and password

    Your assistance in this regard will be most appreciated

    Regards

    Howard

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    Howard,

    Do you need to do this copy from within Microsoft Excel? If not then I will move your post to a more suitable forum.

  4. #4
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    Hi Stuart

    I will take your advise and move my post to a more suitable forum

    Regards

    Howard

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can't move a post yourself. A moderator or admin needs to do that for you. Can you tell us where you want to run the code?

  6. #6
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    [quote name='HansV' post='785816' date='22-Jul-2009 20:38']You can't move a post yourself. A moderator or admin needs to do that for you. Can you tell us where you want to run the code?[/quote]

    Hi Hans

    I feel that the post should be moved to general MS Office Suite.

    What I am looking for is to either import the file from the FTP site directly into an Excel workbook called Cash Sales sheet1 using VBA code or alternatively to copy the file Cash Sales from an FTP Site using code to a directory called C:\downloads

    regards

    Howard

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I don't think you can copy directly from the FTP site into the workbook. To download to a file, see my first reply.

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    [quote name='HowardC' post='785865' date='22-Jul-2009 21:11']What I am looking for is to either import the file from the FTP site directly into an Excel workbook called Cash Sales sheet1 using VBA code or alternatively to copy the file Cash Sales from an FTP Site using code to a directory called C:\downloads[/quote]
    Can you use an Excel web query to access the server interactively? If so, you might be able to write a macro to automate that. Otherwise, you probably need to dip into the Windows API (as described in the amazing article Hans linked to) or find some pre-written libraries for fetching from the internet and saving to disk.

Posting Permissions

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