avpatil
5th April 2002, 07:51
Hi all of you,
What is the easiest way to move file between different directories through Baan program script. I tried using run.prog in which I execute a batch file that contains the command to copy. Is there exists any Baan function to do that? I guess how Baan does say in case of EDI programs.
I am on Baan IVc3, NT SQL.
Thanks for your input.
Arvind
isimeon
5th April 2002, 12:40
You can use tools library odllfilehand
Use bic_info to see correct syntax for functions (copy.file,move.file, etc.)
avpatil
5th April 2002, 15:48
Thanks,
I wam able to copy and move. Where can I get help on the odllfilehand and other functions (Under odll)?
Thanks
isimeon
5th April 2002, 16:06
I haven't documentation for tools libraries. I use only bic_info. Maybe other baanboard users can help us. Some of them are former Baan Developers.
mark_h
5th April 2002, 16:35
Copied this little blurb from my knowledge quest CD. Most of the routines that are in the DLL's are not on the CD, but this one was.
FILE.CP(3GL)
NAME
file.cp Copy a file
SYNOPSIS
long file.cp(const string source, const
string target)
DESCRIPTION
Copies file source to file target. Source
and target may be on a remote host (þhost!pathþ).
RETURN VALUE
The function returns 1 when successfull. A
negative value will be returned on failure.
I also just use bic_info on the tools files. In the case of the ottdllfilehand most of the subroutines are documented.
Good Luck!
Mark
avpatil
5th April 2002, 17:01
Hi
I used the copy.file() and move.file() as suggested above by our friend. Is the file.cp() a different function. The copy.file() and move.file() expects 3 arguments, two one are obvious but he third one is a lin and calle dby reference. Any ideas what is that? I too have knoweldge Base CD Under which section can I find bic_info information.
Thanks to all of you for your input.
Arvind
isimeon
5th April 2002, 17:21
Usage of bic_info in your case:
$BSE\bin\bic_info -a $BSE\tools\ttB40_c1\ottdll\odllfilehand
The result is in attachment.
avpatil
5th April 2002, 17:36
Hi Isimeon,
The attached file in your reply is greta. That helped me. Thanks for your reply.
Also MArk, thankyou for your reply too.
Arvind
mark_h
5th April 2002, 18:02
There is some information on bic_info in the User Documentation/Tools/Program Manual/Dynamic Link Library/Object Information Tool section. Not sure if we have the same version, but you should be able to search for bic_info and find a few hits.
I attached a word document that has a screen shot from KQ.
Mark
NPRao
5th April 2002, 21:07
You might also like to check out the sessions -
ttstpobjinfo and ttstpbaandoc
I know they are available in the latest BaaN versions!
ttstpbaandoc (in HTML form)
ttstpobjinfo (show object info - gives output on the display browser) instead of using the command line options...
vishbaan
29th March 2004, 13:11
dear fnds,
this thread on ottdllfilehand helped me a lot.
But I have a problem.
We have a file pool directory in the baan server. Text files will keep coming in to this directory from many POS systems remote.
I dont know the file name; First I want to a fetch a file from this directory and use that file for appending a baan table and then move the file to another archive folder (move.file() helps here) and then move on to next file.
How to fetch a file from a pre-defined directory one by one using the program script. Can "ottdllfilehand" help? I dont know the file name, I want to read the directory and obtain the files one by one, HOW DO I DO THAT?
any work-arounds, suggestions pls.
Best regards
VISH
avpatil
29th March 2004, 14:00
Hi,
I also have same question. I guess, one of the work around is get the listing of files in a file. And that is possible by doing die or ls. Read that file and get all the files in that directory.
You may have to execute run.prog.
Arvind
vishbaan
29th March 2004, 16:28
dr patil
pls check the following thread, it worked
Baanboard.com > Baan Quick Support: Functional & Technical > Tools Administration & Installation > How to read files from a directory one by one
thanks
VISH