Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Rabiah Begum    on Dec 15 In MS Office Category.

  
Question Answered By: Farah Khan   on Dec 15

Actually, I haven't done raw FTP for quite a while.
I'm doing SFTP from a Unix box, but that doesn't help  here.

If you're currently doing it with a bat file though,
is the bat file "fixed"? or do you have to modify it each time?

if it's fixed:
You can have VBA use the "Shell" function to launch the bat file.

If it needs to be changed:
What I've done in the past is this:
I needed to first use ftp to list the files in the folder at the ftp site, then
download the most recent.
I first used the opentextfile method to open a bat file.
then I write the ftp commands to the bat file, then use Shell to run the ftp.
The results of the ftp are written to a specific log file.
I then use the opentext file to open the log file.
I read the log and determine the filename I need to download.
Then, using OpenTextFile once again, I write the Ftp commands to download
the file, and use Shell to execute it.

If you need help writing the code for this approach,
send me a copy of the ftp file you want to create and I'll throw something
together for you.

Share: 

 

This Question has 10 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Non-Interactive Excel Or get search suggestion and latest updates.


Tagged: