+ Reply to Thread
Results 1 to 6 of 6

connecting to FTP site

  1. #1
    Forum Contributor
    Join Date
    08-31-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    204

    connecting to FTP site

    Hi all, I was wondering if someone could point me in the right direction.

    Currently I have a macro sep up where I pull specific data from a shared drive. I will be storing same data on ftp and I was wondering what are my options to pull the same data? For example, currently I use below code to pull the data.. Am I able to modify that to pull same data now stored on ftp server?

    Any help would be greatly appreciated

    Thanks so much


    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: connecting to FTP site

    When I'm wanting a to use FTP to I just put the FTP commands in a Batch file and then use the VBA Shell command to run the batch file.

    RetVal = Shell("C:\GetFilebyFTP.BAT", 1)

  3. #3
    Forum Contributor
    Join Date
    08-31-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    204

    Re: connecting to FTP site

    sorry, I guess I am little confused what you mean on below..

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: connecting to FTP site

    The FTP process can be put into a batch file i.e. http://www.robvanderwoude.com/ftp.php
    Then once you created this batch file you can use a "Shell" command , within a VBA macro to run the batch/ftp process.

    RetVal = Shell("C:\GetFilebyFTP.BAT", 1)

  5. #5
    Forum Contributor
    Join Date
    08-31-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    204

    Re: connecting to FTP site

    got it.. ok so I put together together the script.. how would I create the bat file?

  6. #6
    Forum Contributor
    Join Date
    08-31-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    204

    Re: connecting to FTP site

    ok I just typed this in text file and renamed (.bat).. then I created macro in excel to pull this from my C drive. with:
    RetVal = Shell("C:\GetFilebyFTP.BAT", 1)

    Wowever it runs everything instantly but does not download any files to my C drive

    Open ftpXXXXXXXX.net
    User di\XXXX XXXXX
    ** files
    get file 1
    get file 2
    get file 3
    bye

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1