It fails because Windows command-line FTP client does not support the passive mode.
The active mode doesn't work for you.
You have 2 options:
1) use another FTP client.
2) try to make it work via active mode. It is possible only in some cases.
I recomend to use another FTP client.
For example, WinSCP FTP client supports scripting and defaults to a passive mode: http://winscp.net/eng/docs/scripting
Here is small example of usage WinSCP FTP client:
C:\Program Files (x86)\WinSCP>winscp.exe /script=C:/ftp_commands.txt
Script `C:/ftp_commands.txt` :
put C:\file.doc /file.doc