Interactive Login Works, Script Login Fails

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello all, here is my problem... i am writing a script for a client, to
download all files from an ftp site, which they can set up in task scheduler
to run overnights.

I have a server/username/password... and if i go to a cmd prompt, and run
the following:
ftp> open ftp.server.com
User (ftp.server.com:(none)): myuser
Password: mypwd
230 User myuser logged in.
It works perfectly. Now however, if i try to run the same exact thing in a
script, as follows:
> ftp.scr ECHO OPEN ftp.server.com
>> ftp.scr ECHO myuser
>> ftp.scr ECHO mypwd
>> ftp.scr ECHO lcd D:\MyDir
>> ftp.scr ECHO MGET *.*
>> ftp.scr ECHO DISCONNECT
>> ftp.scr ECHO QUIT

FTP -s:ftp.scr -i
This fails, with error "530 User myuser cannot log in." Ive dbl, and trpl
checked the username, password and server, and they are all correct in the
script.

Why can i login interactively, but my script fails? I wouldnt think there
would be any difference from the server's point of view. Ive done the same
exact thing though in other cases and it works perfectly. The server is
using Microsoft FTP Service, according to its connection echo: "220
Microsoft FTP Service".

Thanks in advance,
- Arthur Dent


.



Relevant Pages

  • BAT script Help!
    ... I'm hoping to write a script in XP that would put a file onto a FTP ... rename the file and move to to another locaton on ... echo File "Test" does not exist. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Telnet session inside a shell script?
    ... > I'm a beginner and what I'd like to do is to make a script in which I ... > Is there a way it can be done likewise ftp? ... Netcat is much better for scripting than telnet. ... <shellstuff -- no echo> ...
    (comp.unix.questions)
  • Re: Telnet session inside a shell script?
    ... > I'm a beginner and what I'd like to do is to make a script in which I ... > Is there a way it can be done likewise ftp? ... Netcat is much better for scripting than telnet. ... <shellstuff -- no echo> ...
    (comp.unix.shell)
  • Re: Emulated DOS FTP script ?
    ... > Trying to make a batch file that will handle some FTP tasks for me. ... > I have a batch file that creates a FTP script file. ... > ECHO cd webroot>> %FTPSCRIPT% ...
    (microsoft.public.windowsxp.general)
  • Re: [Full-disclosure] reduction of brute force login attempts via SSHthrough iptables --
    ... Anyhow its no problem at all to modify, so if you dont like it, just dont use it. ... on a lame script like this as long as it WORKS and is not insecure. ... echo "~ sorting out ip by ip" ... # echo "not enough failed logins, probably no attack from: ...
    (Full-Disclosure)