homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

command line ftp connection closed by remote host
trying to upload from command line script

 7:14 pm on Apr 22, 2013 (gmt 0)

So strange, had a backup script running and now it is breaking.

Basically I can see the script puts the file on the server, it just has 0kb?

Here is my batch command
FTP -v -i -s:"C:\_shutdown\ftp.txt"

Here is my ftp.txt

open ftp.zzz.zzz
lcd C:\_backup
cd /
mput *.7z

When I run this batch script, it shows me connecting to the remote server, then it pauses and says "connection closed by remote host"

When I log in with win scp with the same credentials I can see the file there with 0kb. Also, note that when I upload with win scp I have no problems. So clearly this is something with the windows 7 ftp command line client? I've even tried uploading to different servers and I get the same result. I've also tried disabling my firewall but that doesnt make any difference.



 7:43 pm on Apr 22, 2013 (gmt 0)

Ok so after some more testing I found a few things

first of all my pc has a dedicated ip (

when I change my ip to then the files upload fine and are not 0kb?

what could be going on here?


 7:45 pm on Apr 22, 2013 (gmt 0)

its seems as long as I make my ip address over .99 everything is fine?


 8:43 pm on Apr 22, 2013 (gmt 0)

Also, have an issue that when uploading more than 1 file the 1st one uploads but the 2nd one shows 0kb?


 9:54 pm on Apr 22, 2013 (gmt 0)

does "uploading more than 1" mean the subsquent "put" fails or the 2nd file of an "mput" command?


 9:59 pm on Apr 22, 2013 (gmt 0)

yes, it hangs on the 2nd one and then says connection closed by remote host


 5:07 pm on Apr 23, 2013 (gmt 0)

my question was either/or, not yes/no...


 6:18 pm on Apr 23, 2013 (gmt 0)

2nd file of an mput command

and what about the whole IP thing? Our office server was .10 and the 7zip backup was uploading but on the server it was 0kb. I changed the office server to .100 and now it works fine?

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved