FTP ls, get, put etc just hang using ftp.exe from a command line


I'm trying to automate (using VB - but that's not too important right now) the upload and download of a single file, and I'm not having much joy.

I can get to the FTP space from seemingly any GUI client, and drag/drop/transfer until the cows come home, but I can't do it from a command line.

So far, I've tried logging on, this is all ok.

I can change to a directory, this is successful.

If I try to list a directory's contents, or issue a 'get' command on a file, I just get:

"150 Opening ASCII mode data connection for file list"

This seemingly hangs until I interrupt it. I've tried entering passive mode as soon as I log on (no difference) I've tried Binary mode to no avail (the file is a CSV), I've removed any firewall from the equation, and I've tried three different connections.

Either way, I can do it with an FTP client, just not through the command line interface. Code to show exactly what I'm doing attached.

I've even tried different FTP sites - no joy. I'm running windows 7.

Thanks for any pointers, I hope it's simple!
ftp open myhost.com 2121
literal pasv
cd myftpdir
lcd mylocaldir
get myftpfile.csv

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jjnet123Author Commented:
D'oh - windows firewall.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
File Sharing Software

From novice to tech pro — start learning today.