FTP Script Causing Problems

DBCox

Board Regular
Joined
Jul 5, 2012
Messages
52
Hello everyone,

I have been using an Excel file with a VBA macro to save and upload multiple files to three different FTP sites daily. It has been working for a few months, but I recently hit a snag with 1 of my 3 FTP servers. It seems to be freezing after the "put" command. The prompt reads:

Code:
ftp> put file.txt
200 PORT command successful.
150 Opening ASCII mode data connection

If I press cntrl+C, I get:

Code:
ftp> put file.txt
200 PORT command successful.
150 Opening ASCII mode data connection
Aborting any active data connections...
Connection close by remote host.

It is working fine for the other two FTP sites. I have tried adding the "quote pasv" command to switch to passive mode. It did not seem to help.

Filezilla works just fine when I input the credentials there.

Any help will be greatly appreciated!

Thanks,

David!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
It seems very hard to debug this as it is dependent on the state of the server you are uploading the file to. That said, I have always used as the "base" a test of the procedure without VBA. Meaning, if you can put the file from the command prompt yourself, "manually", without VBA, then you should probably also be able to script it "automatically", with VBA. As the first, step, then, you should test whether you can put the file "manually" using the command prompt.

Note:
Filezilla works just fine when I input the credentials there.

This begs the question what credentials are required ...
 
Upvote 0
Xenou,

Thanks for the info. Good call on trying to connect and upload manually. It will not work. I tried uploading and downloading, and it would not work. I tried switching to passive mode manually, and it still would not work. Is there anything else I can try on my end? If not, is there something specific I can request be changed on the server end?

Thanks,

David
 
Upvote 0
Usually if FTP doesn't work either it's a matter of permissions, or the network isn't allowing traffic on the FTP port. I'm not very good with that kind of stuff - ideally you can contact an admin for the network on the remote server. Possibly you can try pinging the server using the port to see if it is even listening on that port.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top