Can't run ftp script in Scheduled Tasks to external IP



I was trying to automate a backup on my Windows XP machine and ftp the
backup file to an external FTP server. I've been working on this for
several days now. Running Windows XP with SP2 and the most recent updates
applied.

"Backup.bat"
@rem Set local variables
@set currMon=%date:~4,2%
@set currDay=%date:~7,2%
@set currYr=%date:~10,4%
@set ToDir=E:\backups\
@set ScriptFile=%ToDir%Scripts\
@set FilePrefix=HT2_
@set ConfigFile=BackupConfig.bks
@set currName=%FilePrefix%%currYr%%currMon%%currDay%.bkf
@set currLog=%FilePrefix%%currYr%%currMon%%currDay%.log
@rem Execute the actual Windows backup
@echo...Now starting backup >> %ToDir%%currLog%
@ntbackup backup "@%ScriptFile%%ConfigFile%" /m normal /j "My Backup" /f
"%ToDir%%currName%" /l:f
@rem Ftp the backup to an an FTP server in LA
@echo...Now starting ftp action >> %ToDir%%currLog%
@call E:\Backups\Scripts\Ftp.bat >> %ToDir%%currLog%
@rem delete the current backup file and log
@del %ToDir%%currName% >> %ToDir%%currLog%
exit

"BackupConfig.bks"
D:\Firefox\

(Note: the above file is _NOT_ an ASCII file but was created by the System
Tool "Backup" GUI then copied to its current location)

Ftp.bat
@cd E:\Backups\Scripts
ftp -i -s:E:\Backups\Scripts\FTP.txt 2xx.xxx.xxx.xx

Ftp.txt
ftpuser
ftpuserpassword
binary
cd /ftpdirectory
mput *.bkf
quit

This all works fine when I enter "E:\Backups\Scripts\Backup.bat" in a DOS
window. But it does not work from a "Scheduled Task"! The log just keeps
growing and growing and growing and looks like:

"HT2_20050713.log"
....now starting backup
....now starting ftp action
E:\Backups\Scripts>ftp -i -s:E:\Backups\Scripts\FTP.txt 2xx.xxx.xxx.xx

E:\Backups\Scripts>ftp -i -s:E:\Backups\Scripts\FTP.txt 2xx.xxx.xxx.xx
..
..
..
..
..
Terminate batch job (Y/N)?

The ftp command just keeps going and going and going. When I copied this
same solution to a Windows 2003 server we have, and changed the IP address
to an internal 192.168.1.11 address the scheduled task worked perfectly.

What is it about an FTP to an external server IP address that prevents this
scheduled task from working?

Any help would be appreciated.

Bill_H


.



Relevant Pages

  • Re: how to clear credentials cache
    ... I'm using Genie Backup but the FTP site was not used with it! ... I opened my site with Windows Explorer, ...
    (microsoft.public.windowsxp.security_admin)
  • Re: MVS initiated FTP to Windows
    ... MVS initiated FTP to Windows ... What version of Windows are we talking about??? ... The ftp server is not installed by default, ...
    (bit.listserv.ibm-main)
  • Re: MVS initiated FTP to Windows
    ... Both the Windows machines on my desktop are running a built-in ftp server. ... You can certainly ftp from the host to the ftp server in Windows - I've done it. ... Obviously you need something to act as an ftp client on the host (such as 'ftp' under Open MVS). ...
    (bit.listserv.ibm-main)
  • Re: How to ftp to a XP PC?
    ... Thank you for the detail explanation and understanding for the level of my Windows experience! ... My FTP server is up and running now. ... You can install the whole lot of this by just ticking the ...
    (microsoft.public.windowsxp.general)
  • Re: Connecting to ftp with File Browser
    ... I selected "ftp with login" as type of connection. ... I'm being hosted on a Windows server, ... You may need to add a directory to the URL of the FTP server. ... I tried that in the first place, and File Browser told me ther was no ...
    (Ubuntu)