Re: FTP will not accept password from a batch file



a) post the relevant iis ftp log file.
b) post the actual script content created. don't delete it first
c) if you run the batch file manually, does it work?

--
Regards,
Bernard Cheah
http://www.iis.net/
http://www.iis-resources.com/
http://msmvps.com/blogs/bernard/


"Ragnar Midtskogen" <ragnar_ng@xxxxxxxxxxxxxx> wrote in message
news:udcdP94MHHA.4912@xxxxxxxxxxxxxxxxxxxxxxx
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: new script
    ... The caret character ^ is required when generating test.vbs ... I'm really thankfull for your help (and script). ... #echo>> c:\test.vbs ... remove them before running the batch file. ...
    (microsoft.public.windows.server.scripting)
  • Re: Windows NT Command Script problem
    ... and run a script to copy what needs to be ... >>@echo off ... >>rem END of command file ... >>operable program or batch file. ...
    (microsoft.public.windows.server.scripting)
  • Re: Creating a script to search and replace files in XP
    ... You probably need a batch file. ... How does the script know if the file is unconverted? ... Remove the word "echo" ... echo del "%old% ...
    (microsoft.public.windows.file_system)
  • Re: Help needed with Script
    ... The specification would be in the ini which will be ... There is a fairly comprehensive console command and batch file ... @echo off ... When testing your script or batch file, ...
    (microsoft.public.windows.server.general)
  • Re: Using OR in Scripting?
    ... the end of the batch file. ... echo Found ... its for a logon .bat script. ... and use 2 GOTO ...
    (microsoft.public.windows.server.scripting)