There are usually 2 ports involved for the FTP server.  As suggested here
already, you need to have the FTP server "listening" on a specific port.  In
FTP, one port is used for the control session and the other for the data
transfer.  I think by default ports 21/20 are used for standards FTP.

Also, you mention this is a .bat file.  That confuses me.  In order for FTP
from a PC in a batch type mode, I have always keyed my FTP script into a
file, and then written a small .bat file that uses the Windows FTP
client.... you initiate it by issuing the following DOS command

ftp -s:filename (the filename contains your FTP script)


Carl J. Galgano
EDI Consulting Services, Inc.
550 Kennesaw Avenue, Suite 800
Marietta, GA  30060
(770) 422-2995 - voice
(419) 730-8212 - fax
AS400 EDI, Networking, E-Commerce and Communications Consulting and
Premium Ice Cream Brands shipped Overnight
FREE AS/400 Timesharing Service -
"You ain't gonna learn what you don't want to know" - rw

-----Original Message-----
[]On Behalf Of Angela Wawrzaszek
Sent: Thursday, January 10, 2002 2:48 PM
To: Midrange Mail List (E-mail)
Subject: FTP to a port number on a computer

     My ultimate goal is to be able from an outside source FTP to a server
at our business.  We have several companies and we would like them to all
send there files to a specific folder.  This process should be able to be
automated.    I created a bat program that would FTP to an IP ( the IP
specified is internal, once I get that working I will try to use do this
with the external IP from home.)    The default port for TCP/IP is 21,  I
would like to go to port 20.

Here is my bat pgm.

open [20]
put \\root\home\file.txt newfile.txt

It gives me an error of invalid port number.

If I remove the port number I can run this from DOS,  put it puts my file to
the default port.  My .bat program will not run,  it tells me invalid login.

I can do the FTP from an HTML address line.

Anyone know what I am doing wrong or another way to send a txt file to
another sever ( with the idea that to some it will not be an internal


Angela Wawrzaszek
Nucor Steel Auburn INC.
(315) 258 4205

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email:
To subscribe, unsubscribe, or change list options,
or email:
Before posting, please take a moment to review the archives

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.