rohan_rege
27th September 2002, 21:54
hi

actually i need to develop a code to ftp a ascii file from a local unix server to a directory on aremote unix server........and also vice versa.........

this code then has to be scheduled as a job....

can we do this using baan commands or do we have to write a unix script outside baan

how do i go abt this --- I have abs no idea abt this ......

does anyone have a sample code for such a case.....


thanks in advance
Rohan

NPRao
27th September 2002, 21:57
Rohan,

You can use the BaaN functions like -

http://www.baanboard.com/programmers_manual_baanerp_help_functions_client_file_access_client2server

and

http://www.baanboard.com/programmers_manual_baanerp_help_functions_client_file_access_client2server

there are a few posting on the ftp scripting on the board you just have to use the Search

victor_cleto
28th September 2002, 19:27
I wouldn't complicate, just use normal ftp commands and then set it up thru cron, without going thru Baan.

~Vamsi
28th September 2002, 19:50
client2server and server2client would not work in a job with Baan on Unix. So do not go that route. One of the other options is writing a shell script which could be part of a Baan job.

ssbaan
30th September 2002, 18:32
Some sample Unix script code;

UNIXSERVER=baantest (or use an IP address
NBOSEND=/tmp/testftp.$$ ($$ -process no. unique file name)
NBOLOG=/tmp/ftplog.$$
echo "user John doe" > $NBOSEND (John is ID doe is password)
echo "send thisfile thatfile" >> $NBOSEND
echo "quit" >> $NBOSEND
ftp -n -i -v $UNIXSERVER < $NBOSEND > $NBOLOG

Hope this helps!