I can't connect to ftp server with ftp.exe

M

Marco

Hi.

I'm trying without success to send an access file into a ftp server folder.

my script start to upload and stop in command number 150.

The ftp connects to the server, it enter in the specific folder sart to send
the file but stop.

If I use a FTP server I can see that the file is already in the ftp server
folder because the name is there but with zero bytes and it stops.

I have a batch file that calls the commands in a text file.

This is what I have in batch and text file:

Batch: ftp -s:ftp.txt

text file:
open ftp.server.com
usaername
password
Cd folder

MPUT teste.mdb
y

close

quit


this is the log of cmd

ftp> open ftp.server.com
connect to ftp.server.com.
220 Microsoft FTP Service
Utilizador (ftp.server.com:(none)):
331 Password required for username.

230 User username logged in.
ftp> CD folder
ftp>
ftp> MPUT teste.mdb
MPUT teste.mdb? y
200 PORT command successful.
150 Opening ASCII mode data connection for teste.mdb.


What is wrong?? PLEASE HELP ME


Regards,
Marco
 
P

Pegasus \(MVP\)

Marco said:
Hi.

I'm trying without success to send an access file into a ftp server
folder.

my script start to upload and stop in command number 150.

The ftp connects to the server, it enter in the specific folder sart to
send
the file but stop.

If I use a FTP server I can see that the file is already in the ftp server
folder because the name is there but with zero bytes and it stops.

I have a batch file that calls the commands in a text file.

This is what I have in batch and text file:

Batch: ftp -s:ftp.txt

text file:
open ftp.server.com
usaername
password
Cd folder

MPUT teste.mdb
y

close

quit


this is the log of cmd

ftp> open ftp.server.com
connect to ftp.server.com.
220 Microsoft FTP Service
Utilizador (ftp.server.com:(none)):
331 Password required for username.

230 User username logged in.
ftp> CD folder
ftp>
ftp> MPUT teste.mdb
MPUT teste.mdb? y
200 PORT command successful.
150 Opening ASCII mode data connection for teste.mdb.


What is wrong?? PLEASE HELP ME


Regards,
Marco

I'm not particularly familiar with sending multiple files
using wildcards but I had no problem sending a single
file using your script file. Perhaps the problem is with
your FTP server, your account name or password.
 
M

Marco

Hi.

I think that it's not the account because I have cuteftp and it works.

I tried to open in explorer the ftp address and also worked.

It seems I can't do nothing, not even a DIR I tried with a different ftp
account and also the same.

I always stop in command 150.


I even try with antoher internet connection.

Any ideas?


Marco
 
M

Marco

Hi. I tried from another pc and it worked. The other pc is also running
windowx sp, but have IE6. can it be because of that?

Marco
 
V

VanguardLH

in
Hi.

I'm trying without success to send an access file into a ftp server folder.

my script start to upload and stop in command number 150.

The ftp connects to the server, it enter in the specific folder sart to send
the file but stop.

If I use a FTP server I can see that the file is already in the ftp server
folder because the name is there but with zero bytes and it stops.

I have a batch file that calls the commands in a text file.

This is what I have in batch and text file:

Batch: ftp -s:ftp.txt

text file:
open ftp.server.com
usaername
password
Cd folder

MPUT teste.mdb
y

close

quit

this is the log of cmd

ftp> open ftp.server.com
connect to ftp.server.com.
220 Microsoft FTP Service
Utilizador (ftp.server.com:(none)):
331 Password required for username.

230 User username logged in.
ftp> CD folder
ftp>
ftp> MPUT teste.mdb
MPUT teste.mdb? y
200 PORT command successful.
150 Opening ASCII mode data connection for teste.mdb.

What is wrong?? PLEASE HELP ME

Regards,
Marco

Same problem if you run ftp.exe and enter the commands manually (i.e.,
without using a script)?

Why are you using MPUT instead of PUT? You are only specifying a single
file. MPUT is for specifying multiple files. What happens when you use
PUT?

Also, why are you not using BIN to send in binary mode (to ensure you
get the same bits up in the file on the server as you have on your
host)? You could also add HASH to see pound signs added to each line to
show the progress of the PUT operation. How many #'s you see depends on
how large is the file that you are sending.

Although you can change to a directory, do you have permission for that
username to write into that directory?
 
V

VanguardLH

in
Hi. I tried from another pc and it worked. The other pc is also running
windowx sp, but have IE6. can it be because of that?

No web browser is involved when using ftp.exe. Sounds more like a
firewall issue. What happens when you disable the firewall? The login
and controls (commands) for FTP are handled over port 21. The data gets
sent over port 20. You'll need to enable both ports, and also enable
TCP and UDP over those ports, in your firewall for the outbound connects
from ftp.exe.

What happens when you run manually:

ftp <servername>
<username>
<password>
ls
quit

Do you get past the 'ls' command?
 
M

Marco

Hello.

If I go to run and type ftp, in the command line box I type open ftp.marco.com
then it ask for the user and I write Marco then asks for the pass and I type
it.

then I type any command, such as Send; Mput; Put; Ls; Dir; .... and says
that the command 200 is sucessfully but it stops in the command 150.

I tried in another PC withthe same internet connection and it worked. ( the
problem is that the other PC is not mine)

The only difference besides the brand is the mine has IE7.

I start to think that the problem is not the ftp server account or internet
connection is someething with mmy pc.

What can I do?

Regards.
Marco
 
B

Big Al

Marco said:
Hi.

I'm trying without success to send an access file into a ftp server folder.

my script start to upload and stop in command number 150.

The ftp connects to the server, it enter in the specific folder sart to send
the file but stop.

If I use a FTP server I can see that the file is already in the ftp server
folder because the name is there but with zero bytes and it stops.

I have a batch file that calls the commands in a text file.

This is what I have in batch and text file:

Batch: ftp -s:ftp.txt

text file:
open ftp.server.com
usaername
password
Cd folder

MPUT teste.mdb
y

close

quit


this is the log of cmd

ftp> open ftp.server.com
connect to ftp.server.com.
220 Microsoft FTP Service
Utilizador (ftp.server.com:(none)):
331 Password required for username.

230 User username logged in.
ftp> CD folder
ftp>
ftp> MPUT teste.mdb
MPUT teste.mdb? y
200 PORT command successful.
150 Opening ASCII mode data connection for teste.mdb.


What is wrong?? PLEASE HELP ME


Regards,
Marco
If you are using 'mput', type a 'prompt' before that and remove the 'Y'
from your script.
The Prompt command stops the system from asking 'do you want to send
this' and you having to say yes to each file when using mput.
And as has been stated, send or put, are betting for a single file.

prompt
mput test*.mdb
quit

This would be all you need.
 
M

Marco

Hi.

I tried prompt before LS and says Intreractive mode off then I tried with
mput and says the same.

If I use promt after the command there's no message because it hangs in 150
command..

Regards,
Marco
 
V

VanguardLH

in
Hello.

If I go to run and type ftp, in the command line box I type open ftp.marco.com
then it ask for the user and I write Marco then asks for the pass and I type
it.

then I type any command, such as Send; Mput; Put; Ls; Dir; .... and says
that the command 200 is sucessfully but it stops in the command 150.

I tried in another PC withthe same internet connection and it worked. ( the
problem is that the other PC is not mine)

The only difference besides the brand is the mine has IE7.

I start to think that the problem is not the ftp server account or internet
connection is someething with mmy pc.

What can I do?

Regards.
Marco

See my other reply as it may be a firewall problem.
 
B

Big Al

Marco said:
Hi.

I tried prompt before LS and says Intreractive mode off then I tried with
mput and says the same.

If I use promt after the command there's no message because it hangs in 150
command..

Regards,
Marco
You only put prompt in once. Its a toggle type of command. Just once
at the beginning of the script and any mput command from then on will
not prompt you for 'y/n' response.
It won't change your problem, I'm just trying to make your script a bit
more streamlined if you get the 150 error to correct.

Has this worked with this site before?

I've had a lot of issues with passive / nonpassive mode transfers. Some
servers don't like one or the other. Problem is that windows ftp will
only do it one way and not the other. If you have another program like
the freeware filezilla, you can set up the site and pick passive or not.
The only command line program I've seen that works in the mode
opposite to windows' ftp, is 'move it freely'. Its a free scriptable
ftp program just like windows ftp is.

I think someone else asked if you could do an 'ls' command. I've found
that if ls cannot be done, then this is a good indication of the passive
/ non-passive mode problem.

Just suggestions.
 
M

Marco

Hi,

Here it is the log of the ftp command line:

230 User geral logged in.
ftp> prompt
Interactive mode off .
ftp> cd db
250 CWD command successful.
ftp>
ftp> mput pobidos.mdb
200 PORT command successful.
150 Opening ASCII mode data connection for pobidos.mdb.

and it stops in the last line» 150.........

I tried from another pc with the same internect connnection and it worked.

This pc has the firewall off.

I'm getting crazy.

Cheers,
Marco
 
B

Big Al

Marco said:
Hi,

Here it is the log of the ftp command line:

230 User geral logged in.
ftp> prompt
Interactive mode off .
ftp> cd db
250 CWD command successful.
ftp>
ftp> mput pobidos.mdb
200 PORT command successful.
150 Opening ASCII mode data connection for pobidos.mdb.

and it stops in the last line» 150.........

I tried from another pc with the same internect connnection and it worked.

This pc has the firewall off.

I'm getting crazy.

Cheers,
Marco
Okay, but I think you need to try passive and non-passive modes and find
out if that setting works. I find it all the time at clients. I know,
I've read your comment that another pc works.
 
M

Marco

Can you teach me how to try to use in passive and non-passive mode?

Some example. :)

Thanks.
Marco
 
B

Big Al

Marco said:
Can you teach me how to try to use in passive and non-passive mode?

Some example. :)

Thanks.
Marco
Downlod moveitfreely. You'll have to install it and set it for
whichever works. It has the option on the command line to set either.
But the bottom line is, windows ftp will do nothing for you to test,
it has no option.

This may all be for naught, but I've hit your roadblock at the LS many
times. It always fixed the issue. Okay, 99%.
http://www.bestsoftware4download.com/software/t-free-moveit-freely-download-mkoxecyi.html
 
B

Big Al

Big said:
That link is for version 5.0.
You can get it on softpedia here
http://www.softpedia.com/get/Internet/FTP-Clients/MOVEit-Freely.shtml
version 3.1

I just loaded the 3.1 to review for myself.
It includes a 'passive' command that ftp.exe does not.
Its just like prompt, in that it toggles the passive transfer mode on
and off.
You should be able to run your same script but just replace ftp.exe in
the batch file with ftps.exe. And of course add the 'passive' command
in the script or not and see if either works.

Bottom line is ftps, is supposed to be identical to ftp. It also allow
secure transfer as well.
 
M

Marco

GREAT GREAT GTREAT.

How can I pay you??

But I have another problem. Now it puts the *.mdb in the server but with
zero bytes. But now with the passive mode it wok, don't hangs on the 150
command.

But, way the access files stays with zeros bytes?

Regards,
Marco
 
M

Marco

it now start to send the mdb file.

I'm a newbie in ftp. Is this ok to upload subfolders?

Marco
 
B

Big Al

Marco said:
it now start to send the mdb file.

I'm a newbie in ftp. Is this ok to upload subfolders?

Marco
With FTP I've never found a way to do sub folders.
Obviously you can do:
cd x
mput *.*
cd ../y
mput *.*
cd ../z
mput *.*

If you want to do extensive subfoldering, a formal program like
filezilla will do that. Its free. Problem is, I don't think you can
schedule or write scripts. "THINK" I said.
I use filezilla to upload my web page. I can build a whole set of
folders and bing, just send the folder et al.

Not sure what you are doing and why the scripting. So take it from there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top