cancel
Showing results for 
Search instead for 
Did you mean: 

ftp put creates empty file

hobjohns
Dabbler
Posts: 22
Registered: ‎30-07-2007

ftp put creates empty file

I frequently use a simple batch file incorporating a put command to upload a text file to my webspace. Until the new hosting arrangements it worked fine. Now all I get is an empty file in the webspace.
I know next to nothing about ftp command line, but have successfully logged on and tried entering a put command manually. I have ensured ascii mode, and tried PASV. Still the file uploaded is empty.
I can transfer the file successfully using CuteFTP, but it's a long-winded process compared to simply executing a batch file.
Can anyone suggest what's now going wrong, and how I can fix it?
1 REPLY 1
bobpullen
Community Gaffer
Community Gaffer
Posts: 14,884
Thanks: 2,489
Fixes: 168
Registered: ‎04-04-2007

Re: ftp put creates empty file

Our server cluster doesn't appear to play nicely with active FTP and seems to require passive mode. Windows ftp.exe does not support passive mode. I'm almost certain this will be the cause of your problem. You'll see what I mean if you try FTP'ing from a command line and issuing a list (ls) command. It will stall and eventually time out.
Hostopia have a case open with their hardware vendors I believe because this behaviour isn't exhibited by their server estate in the US.

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵