Thread: FTP Script
View Single Post

   
  #1 (permalink)  
Old 01-05-2008, 06:15 AM
Antigoni
 
Posts: n/a
Default FTP Script

I have a script which ftp some files which are created from our system
every day with the end of day procedure.A part of the script is the
following:

#File
FILE_NAME=AF$(date +"%d%m%y").txt

more AFBTF001* AFBTF003_B* AFBTF004* AFBTF04B* AFBTF030* AFBTF035*
AFBTF047* AFBTF065* AFBTFADM* AFBTF066* AFBTFBRN* AFBTFUSR* >
$FILE_NAME

ftp -n $FTP_HOST<<END_SCRIPT
quote USER $FTP_USER
quote PASS $FTP_PASSWD
ascii
prompt off
cd $REMOTE_DIR
put $FILE_NAME

The files AFBTF001* AFBTF003_B* AFBTF004* AFBTF04B* AFBTF030*
AFBTF035* AFBTF047* AFBTF065* AFBTFADM* AFBTF066* AFBTFBRN* AFBTFUSR*
may be created before midnight or after.

I want someone to help me how to change my script so that in case the
files are created after midnight, not to take the next day´s date.
Reply With Quote