BAT script Help!



ck1763
07-10-2005, 02:36 AM
Hello,

I'm hoping to write a script in XP that would put a file onto a FTP
server and afterward, rename the file and move to to another locaton on
the hard drive. I try to user the following script that was written for
Windows 2K and it's not working.

REM *** Browse to files ***

REM *** FTP file to HOOD
ftp -i -n [ftp server]
user [username] [password]
cd [directory]
mput [location of file ie: c:\files\]
close
quit

REM **** Rename the file to a date format ****

@echo off
c:
cd [location of file ie. c:\files\]
if exist "Test" goto :start
echo File "Test" does not exist.
goto :EOF
:start
setlocal
set zdate=%date:~4%
set zdate=%zdate:/=%
set zdate=%zdate:~4,4%%zdate:~0,4%
set ztime=%time:~0,6%
set ztime=%ztime::=%
set ztime=%ztime: =0%
ren "Test" "Test.%~n1%zdate%%ztime%%~x1"
@echo on

REM **** Move the file to the current_feed directory ****
move /Y Test* [new location c:\test\backup\]

Thank you!


--
ck1763


BAT script Help!