rustem
24th July 2003, 10:41
Hello!
Baan IV c4, OS: Windows 2000 Advance Server.
I need to check in baan program whether exists or not directory on remote host (directory is accessible if I use Windows Explorer from host where baan is installed and run). And I also need to write files there. Function stat.info cannot help me. (or I use it incorrectly).
mark_h
24th July 2003, 15:39
Here is a search (http://www.baanboard.com/baanboard/search.php?s=&action=showresults&searchid=137141&sortby=lastpost&sortorder=descending) I ran. You may want to check out some of the threads. I think several may apply to your request.
Good Luck!
Mark
rustem
25th July 2003, 10:46
I looked through of the search results you gave me. But I haven't found solution to my problem.
I need OS indepentent way to check whether exists or not directory (both on local and remote hosts).
Thanx.
mark_h
25th July 2003, 23:34
This thread (http://www.baanboard.com/baanboard/showthread.php?s=&postid=26072#post26072) talks about create.local.directory. You might be able to use this to see if a local directory exists. Check the library on the board out for this command.
For remote servers you could try mkdir (http://www.baanboard.com/programmers_manual_baanerp_help_functions_directory_file_operations_mkdir), but you have to have security setup correctly to get this to work.
It is kind of hard sometimes making recommendations without knowing all of the details.
Mark
NPRao
26th July 2003, 00:56
Rustem,
As Mark, pointed out refer to the different functions available in the tools library - ttdllfilehand.
Library ttdllfilehand
File Handling, also working for remote
(38 Functions available)
--------------------------------------------------------------------------------
This library contains functions for handling files.
Unless stated otherwise in the specification of the function, each
function can be used for both local and remote files.
file.present
long file.present( const string path() )
pre: true
return: This function returns true if path is an existing
regular file and can be written.
Otherwise (file does not exist or file is no regular file or
user has no write permission for file) it returns false.
dir.present
long dir.present( const string directory() )
pre: true
return: This function returns true if directory is an existing
directory and can be written.
Otherwise (file does not exist or file is no directory or
user has no write permission for file) it returns false.
Also check if you setup the Remote User Data in BaaN and proper authorizations on the other system.
rustem
28th July 2003, 08:39
Thanx to you and additional question.
How must I pass the path of remote (shared) directory to function dir.present? I tried dir.present(\\Host\SharedFolder) and dir.present(Host!SharedFolder) - for Windows OS. Bud I failed. And another question - how must I pass this argument in case of UNIX OS?
Thanx
bizen99
29th September 2003, 11:14
Hi,
is function 'file.present' only for binary files?
thanks
mark_h
29th September 2003, 15:27
You can use it to search for any file. Just note that for the function to return true the file must be writeable by the user.
Mark
bizen99
29th September 2003, 15:39
when I check this function with a binary-file work fine, but when I check with text-files always say 'false',...
Hitesh Shah
29th September 2003, 15:44
You may try function seq.fstat.local in ottdllbw . It should work.
Functions in ttdllfilehand work for remote server for which remote user is created. I believe the paths u are specifying is network path only. So any ottdllbw functions should work.
bizen99
30th September 2003, 11:38
thanks, the function work perfectly