BATCH: FTP on a port different from port 21??

LezardMoo Posted messages 614 Status Member -  
LezardMoo Posted messages 614 Status Member -
Hello everyone !!!

I’m trying to automate file sending via FTP in a small batch but... it’s stuck!

In my batch, I have this line:

ftp -s:ftp.txt

In ftp.txt:
 open host.com 2100 <user> <pass> hash bin put "file.rar" bye


However, I keep getting a 501 error, which comes from the fact that I specify port 2100 for the connection, and it doesn’t like that...
The syntax is usually
open host.com
But my FTP is not on port 21 but on port 2100.

In CLI, it works normally if I do open host.com 2100, but not in the batch... (It’s totally twisted, merdows)

I’ve tried different ways but nothing works, impossible to connect to port 2100...

Any ideas, anyone?

Thanks in advance

Configuration: Windows 7 / Firefox 15.0.1

3 answers

  1. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
     
    0
    1. LezardMoo Posted messages 614 Status Member 14
       
      bidon...
      doesn't work, that's exactly why I'm posting...

      open host.com 2100 <==== DOES NOT WORK IN A BATCH
      <user>
      <pass>
      hash
      bin
      put "file.rar"
      bye
      0
    2. f894009 Posted messages 17417 Registration date   Status Member Last intervention   1 717
       
      Re,
      I was too quick, I continue to search.
      0