Project Description:
Backgroung ftp script : Lunguage Perl
1. Select files ending with .ftp every x minutes in a particular directory ( start up arg 1 ) including sub directories
2. Log output to a file ( arg 2)
3, Sleep for x seconds ( arg 3)
4. Only transfer or continue the next action if command is successfull, raise email alert when error is met
Sample ftp files:
( Put action )
>cat test1.ftp
server=server1
user=user1
pass=password1
mode=ascii
cwd=somedir
lcd=path
file=somefile or wild card *.txt
direction=put
archive=path
removeafterftp=yes
sleep=60
convertfile=unix2dos
deleteremote=yes
(Get Action )
>cat test2.ftp
server=server1
user=user1
pass=password1
mode=binary
cwd=somedir
lcd=path
file=test.txt
direction=get
archive=path
removeafterftp=yes
sleep=90
convertfile=dos2unix
deleteremote=yes
The parameters are self explanatory the following need more detaisl
file, if a wild card is given then use nlist to get file and match pattern. In addition if more that one file is specified the files will be seperated by comma
convertfile, if put convert file from dos to unix if ( dos2unix) or vice versa if ( unix2dos). If get purform action after file is retrieved.