PeterH
27th July 2005, 11:18
Hi All,

I've made an AFS-script to import an ascii file into "Maintain hours accounting transactions" (tphrs1100m000). Now I face the following problem. The ascii file is on a windows server, always created at the same location. BaaN is on a Unixserver. I want to start an hourly job, to copy the ascii file from server a to server b and then start the AFS-script. How can I achieve this?

Thanks in advance.
Peter.

günther
27th July 2005, 11:56
There are two different approaches:
1. You connect the two servers (mount, samba etc) so that they share a directory; this means that you have to check after reboots, but you don't have to copy.

2. You copy the files; you can use ftp in batch mode e.g.

ftp -inv
open <machine>
user <login> <password>
ascii # or binary
get <file> # or get <source-file-name> <destination-file-name>
quit


Günther

Youp2001
29th July 2005, 10:05
Or you could use the standard Baan function client2server....

long client2server( string source, string dest, long text.mode [, long rm.file] [, long progress.window] )

Description
This copies a specified file from the client to the server. The function supports long file names.

vahdani
30th July 2005, 00:28
Hi Youp2001,

the problem with client2server function is that you need a running Baan GUI in order to use it. This is unfortunately not possible when your program runs in a job. I have personally had good experience with using FTP and can only recommend it. Just start Windows own FTP Server (Part of IIS), do some tweaking and you're done!