FTP command in Windows hangs with "150 Opening data channel for file download from server of ..."
<p>I have a FTP server on a Windows Server 2012 machine and I am trying to get <code>setup.exe</code> from it. </p>

<p>CMD.EXE log:</p>

<pre><code>C:\&gt;ftp 1.2.3.4
Connected to 1.2.3.4.
220-FileZilla Server version 0.9.45 beta
220-written by Tim Kosse (tim.kosse@filezilla-project.org)
220 Please visit http://sourceforge.net/projects/filezilla/
User (1.2.3.4:(none)): my_username
331 Password required for my_username
Password:
230 Logged on
ftp&gt; get setup.exe
200 Port command successful
150 Opening data channel for file download from server of "/setup.exe"
.. and stays like this
</code></pre>

<p>CMD.EXE log 2:</p>

<pre><code>C:\&gt;ftp 1.2.3.4
Connected to 1.2.3.4.
220-FileZilla Server version 0.9.45 beta
220-written by Tim Kosse (tim.kosse@filezilla-project.org)
220 Please visit http://sourceforge.net/projects/filezilla/
User (1.2.3.4:(none)): my_username
331 Password required for my_username
Password:
230 Logged on
ftp&gt; quote cwd /
250 CWD successful. "/" is current directory.
ftp&gt; quote TYPE I
200 Type set to I
ftp&gt; QUOTE PASV
227 Entering Passive Mode (185,7,63,37,115,151)
ftp&gt; RETR setup.exe
Invalid command.
ftp&gt; QUOTE RETR setup.exe
425 Can't open data connection for transfer of "/setup.exe"
ftp&gt; get setup.exe
200 Port command successful
150 Opening data channel for file download from server of "/setup.exe"
Aborting any active data connections...
Aborting any active data connections...
Connection closed by remote host.
ftp&gt; quote get setup.exe
Not connected.
ftp&gt;
</code></pre>

<p>FileZilla log:</p>

<pre><code>Status: Connection established, waiting for welcome message...
Response:   220-FileZilla Server version 0.9.45 beta
Response:   220-written by Tim Kosse (tim.kosse@filezilla-project.org)
Response:   220 Please visit http://sourceforge.net/projects/filezilla/
Command:    AUTH TLS
Response:   502 SSL/TLS authentication not allowed
Command:    AUTH SSL
Response:   502 SSL/TLS authentication not allowed
Status: Insecure server, it does not support FTP over TLS.
Command:    USER my_username
Response:   331 Password required for my_username
Command:    PASS **************
Response:   230 Logged on
Status: Logged in
Status: Starting download of /setup.exe
Command:    CWD /
Response:   250 CWD successful. "/" is current directory.
Command:    TYPE I
Response:   200 Type set to I
Command:    PASV
Response:   227 Entering Passive Mode (185,7,63,37,98,242)
Command:    RETR setup.exe
Response:   150 Opening data channel for file download from server of "/setup.exe"
Response:   226 Successfully transferred "/setup.exe"
Status: File transfer successful, transferred 5,120 bytes in 1 second
</code></pre>

<p>Why it works with FileZilla but not with Windows FTP from command-line?</p>

<p>More than that I would want a command that executed one time would download this file from that FTP without asking the password.</p>

<p>Any ideas?</p>

<p>Thanks.</p>