cannot upload to ftp server

Li0nel
Li0nel used Ask the Experts™
on
trying to upload to my ftp server but just get a "500 Illigal PORT Error"
This script works on every other system i have installed it on.
I have had a look round and there was a post on here where the resolution was to replace ftp.exe.
This isnt what i was hoping to do, if somebody could explain why this situation is caused maybe I can remove the cause of the error.

Here is the script
@echo off
echo %date%>>rhts.txt
echo user user@domain.co.uk>ftpcmd.dat
echo password>>ftpcmd.dat
echo prompt>>ftpcmd.dat
echo cd uploads>>ftpcmd.dat
echo bin>>ftpcmd.dat
echo put rhts.txt>>ftpcmd.dat
echo quit >>ftpcmd.dat
ftp -n -s:ftpcmd.dat ftp.lionelbaden.co.uk
del ftpcmd.dat
del rhts.txt

I get the Error Right after Put rhts.txt

Thanks in advance
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Just a question, does this server have ftp access? Have you tried to do it manually w/o the script and it work or use another program like FTP Explorer, to ensure it has access? Thanks

Commented:
I don't think the error is in the script.
The error is most likely in the network connection of your host.
ftp.exe doesn't have the capability to establish passive mode connections and it seems like the NAT requires one. Hence, the attempt to initiate the data connection causes an error.

You'll probably need a change in the network connection or a replacement for ftp.exe.

Author

Commented:
the script is fine as it works on all the other client machines.  
So you would recommend checking the router for the NAT ??

 I am running this on SB server 2003,
could you reccomend a good replacement for ftp.exe ??
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Top Expert 2014

Commented:
Sounds like the ftp server is setup to support passive ftp data connections only.  You need to get a client that supports passive.  The "PORT" command is used for active data connections.
dear friend use the filezilla Clint for uploading Ur file on the server its very helpful for u. and u can use also dream weaver for uploading site.
Jason WatkinsIT Project Leader

Commented:
FileZilla = Awesome FTP application!

Author

Commented:
i have to admit i do like filezilla but how would inocperate that into my Script ??
IT Project Leader
Commented:
Excerpted from Filezilla web-site;

You can add commands in a textfile and run it trough the commandline.
e.g.: filezilla -x myfirstcomandfile.txt
myfirstcomandfile.txt:
errorlog="c:/temp/$1.errorlog"
connect ftp.xxx.com
chdir /mydir
lchdir /backup
mget *.*
close
execute zip -input c:/backup/ -output c:/backup/myzip.zip

http://trac.filezilla-project.org/ticket/2679
Top Expert 2010

Commented:
Firebar has the right idea.  I've deployed Filezilla with scripted solutions and it works quite well and you can't beat free!
Jason WatkinsIT Project Leader

Commented:
Thanks digitap! Filezilla is our standard FTP client on the PC at, work.
Top Expert 2010

Commented:
yes, I like it too...although, i jump on most band wagons that are anti-M$...>GRIN<!
Jason WatkinsIT Project Leader

Commented:
No one can blame you for that. M$FT is going around the bend as of lately, but I have to give kudos for Windows 7, great O.S.
Top Expert 2010

Commented:
yes, just as windows 2000 was pennance for windows ME, so windows 7 is for vista.
Jason WatkinsIT Project Leader

Commented:
2K, ME were two different things. Business snd consumer products. Vista used different SKU to approach the same question. Great idea! :)

Author

Commented:
ahh is awesome i see :)

 many thanks
Jason WatkinsIT Project Leader

Commented:
Thank you...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial