Create Instance of TextStream

Chandan_kansalChandan_kansal Member Posts: 27
edited 2006-05-16 in Navision Attain
Hello Everybody,

In navision, how file system is used.I mean to say how instances of 'Microsoft scripting Runtime' classes.Actually I want to access text files through navision.I m able to create the files but cann't access them.I want to read,write and copy etc. in the files thru navision.
Anyone having idea...

thanx.

Comments

  • AlbertvhAlbertvh Member Posts: 516
    Hi
    you will need to create some variables

    PathandFilename as text 250
    Line as Text 1024
    InputFile as File

    then in the code

    PathandFilename := 'C:\Text.txt'; // This can be a variable
    if inputfile(PathandFilename).OPEN THEN BEGIN
    InputFile.READ(Line);
    END;

    Hope this gives you some pointers.
  • Chandan_kansalChandan_kansal Member Posts: 27
    Thanx albert.
    But is there any need to use automation field.Can we do it using automation.If yes then how.If not why?

    Thanx.
  • AlbertvhAlbertvh Member Posts: 516
    Hi Chandan_kansal

    Sorry for the late reply
    I think that if you are going to Read, Write and Copy you shouldn't use the Automation unless you are going to run a script. You have control from within Navision to do these actions that you require.

    In-house we are using the Job Scheduler to run various codeunits that in turn create read and copy files. :)
Sign In or Register to comment.