FTP will not accept password from a batch file



Hi all,

I have run into a strange problem running FTP with a batch file.
The batch file is used to run various NTBACKUP backup operations, then FTP
the backup files to a different server.
The batch file runs correctly and creates all the backup files but does not
get logged in to the FTP server

Looking at the log file created by the batch file I can see that the
connection to the FTP server is made and the userid accepted.
But the password apparently is not, because I get error 331, need password.
In a command window I can connect OK manually with the same userid and
password.

I have set up backups on a couple of dozen of our servers using basically
the same batch file and they all work well.

The last part of the batch file, where I create and run an FTP script is
shown below:
----------------------------------------------------
REM create FTP script
echo open [IP address] > FTPscript.txt
echo [userid] >> FTPscript.txt
echo [password] >> FTPscript.txt
echo prompt n >> FTPscript.txt
echo cd E:\%DAY% >> FTPscript.txt
echo put %BackUpDir%\%ServerName%-backup.bkf >> FTPscript.txt
echo put %BackUpDir%\Registry_Settings\%ServerName%-Registry-backup.bkf >>
FTPscript.txt
IF %DAY%==Sun echo cd E:\SystemState
IF %DAY%==Sun echo put
%BackUpDir%\System_State\%ServerName%-SystemState-backup.bkf >>
FTPscript.txt
echo quit >> FTPscript.txt

FTP -s:FTPscript.txt

ERASE FTPscript.txt
------------------------------------------------------

Any comments or suggestions would be appreciated.

Ragnar


.



Relevant Pages

  • Re: Scheduled Tasks Doesnt Wait for Backup to Finish
    ... running the DVD Differential job, but it is not shown running in Scheduled ... get a bad DVD once in a while, but Backup MyPC tells me. ... Run the batch file you see below. ... echo %date% %time%> c:\log.txt ...
    (microsoft.public.windowsxp.general)
  • Re: Backup utility
    ... You could create the following batch file: ... @echo off ... if %e% GTR 0 echo One or more errors occured during the backup process. ... files from the Source area to the Target area. ...
    (microsoft.public.windowsxp.general)
  • Re: Scheduled Tasks Doesnt Wait for Backup to Finish
    ... Differential.txt is Backup MyPC's log. ... So there may be a way for Backup MyPC to wait until ... Run the batch file you see below. ... echo %date% %time%> c:\log.txt ...
    (microsoft.public.windowsxp.general)
  • Re: Backup problem
    ... echo Dagen är %dow% ... What do you get when you run this command in a Command Prompt: ... Please attach your batch file to your reply. ...
    (microsoft.public.win2000.general)
  • FTP question...
    ... my batch file will initiate the ... How to send text to the FTP process. ... I believe echo is the solution, ... Prompt you for a user name. ...
    (microsoft.public.inetserver.iis.ftp)