PeterH
11th October 2002, 10:31
BEfore using the function server2client or client2server we want to check if the directories exist on both systems. For the unix server the function stat.info is used and works correctly but for the client (windows 2000) the functions stat.info() and dir.open() doesn't give any response, only that the directory doesn't exist.
Even if the windows directory exists.

These function can be used within the program or report scripts. We are developing a session so a baan user can copy files between unix (server) and windows(client).

Natasha
11th October 2002, 10:38
When user started bw.exe, the current directiry Windows is ..\Program Files\Baan\Bin.

NPRao
11th October 2002, 10:52
You can use -

http://www.baanboard.com/programmers_manual_baanerp_help_functions_client_file_access_create_local_directory

More Info -


FunctionUsage
Expl.: - This function creates a directory on the client
Post: - The directory "client.dir" is created on the client
Input: - client.dir -> the name and path of the directory
Return: - 0 | succeed
183 | directory already exists
<> 0 | failure
70 Permission is denied.
380 Invalid property value.
382 Property is read-only at run time.
383 Property is read-only.
394 Property is write-only.
EndFunctionUsage


Remember, to put the code in your script -

#pragma used dll ottdllbw

Ilansu
17th October 2002, 18:48
NPRao Hi.

I'm trying to use this function to check if a directory exist :


function check.if.dir.exist()
{
long ret
ret=create.local.directory(file.name)
if ret=0 then
message("INVALID DIRECTORY NAME !")
remove.local.directory(file.name)
endif

}

but i get an error :Function 'create.local.directory' returns no value

when i use the create.local.directory(file.name) without a return value the directory is created.

any idea ?

I'm using Baan 4c4 on Unix.

Thanks
Ilan S

mark_h
17th October 2002, 20:15
Ilan,

I did a bic_info6.1 on ottdllbw and on our 4c3 system the function create.local.directory is declared as just extern. No return code. It may be the same on 4c4 and what NPR was talking about was Baan 5.

Here is what the bic_info returned:
function extern create.local.directory(
string dirent(256) )
so this may not work for you and I do not know of a way to check it.

Mark