Forgot to mention that the above is a batch file.
Main Topics
Browse All TopicsI've created a simple batch file to upload a small text file to our ftp site. The batch runs and logs in successfully but hangs at the put command. After a while it times out and closes the dos window. I am able to manually upload the file using IE or Filezilla. What am I missing?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
In IE, the directory is:
ftp://99.99.99.99/director
How should this path look in the batch file?
Does it work if you do the same commands manually using ftp.exe ?
Sounds to me like the connection needs to use passive mode due to firewall restrictions inbetween you and the server BUT ftp.exe does not support passive mode. You could use PASV command but that sets the server end to passive mode but ftp.exe does not work with that....
Trouble is ftp is a two way protocol by default which is difficult for port based firewalls, especially for instance on simple port filtering firewalls like you get with ISP hosted servers etc. sometimes.
You could use a different command line client like this:
http://www.ncftp.com/
Steve
If you just need to put one file you could use:
http://www.ncftp.com/ncftp
download is ftp://ftp.ncftp.com/ncftp/
ncftpput -u username -p password 99.99.99.99 /destdir c:\filetoput.txt
http:#25407516 proved to me the issue is with ftp.exe and therefore more than likely passive mode / simple port firewall issue as filezilla works to the same host. leakim971 and netcmh offered valid troubleshooting to get to that stage.
Business Accounts
Answer for Membership
by: netcmhPosted on 2009-09-16 at 12:07:21ID: 25348942
Try this
Select allOpen in new window