Navision File Functions v1.1

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
edited 2005-12-08 in Download section
Navision File Functions
Navision File Functions is a simple and direct implementation of the Delphi functions FindFirst, FindNext and FindClose.

Created this DLL to import (dataport) multiple files in one run.
See NavFileFn - Example of use.htm for more information.

http://www.mibuso.com/dlinfo.asp?FileID=531

Discuss this download here.

Comments

  • pdjpdj Member Posts: 643
    What is the advantage compared to the systemtabel File?
    Regards
    Peter
  • markvandermeijmarkvandermeij Member Posts: 26
    None, whatsoever.
    To be honest, when making this I didn't realize there was an Navision function available for this:
    From the forum Navision Attain, "File searches in Navision"
    Extracted from the example as stated by Luc van Dyck, does exactly the same thing:

    recFile.SETRANGE(Path,'c:\temp\');
    recFile.SETRANGE("Is a file",TRUE);
    recFile.SETFILTER(Name, '@*.TXT');

    IF recFile.FIND('-') THEN BEGIN
    REPEAT
    MESSAGE(recFile.Name);

    UNTIL recFile.NEXT = 0;
    END
    ELSE
    MESSAGE('no file found');

    Luc, can you pull this file form the download list, because it is useless
  • ajhvdbajhvdb Member Posts: 672
    Don't delete it. If you browse through the folders and the foldernames (total pathname) together are above 90 positions Navision errors out.

    There is a sample with the wshell available also.
  • markvandermeijmarkvandermeij Member Posts: 26
    Hmm, as said before a great tool...but without kidding if it can help anybody improving there business it should stay on there.

    Still want to thank Peter for his remark on the need of this tool, because at the customer where we use it they have a standard desktop load and every extra DLL is one too many (not mentioning the problems of getting it installed on all Navision clients).

    As said on my webpage, if anyone does really needs a (system) function not available in Navision but available in other programming languages mail it to me and I will give it a go...
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    Navision File Functions v1.1
    Navision File Functions is a simple and direct implementation of the Delphi functions FindFirst, FindNext and FindClose.

    Created this DLL to import (dataport) multiple files in one run.
    See NavFileFn - Example of use.htm for more information.

    Version 1.1:
    Added the function FindSetDirectory, which can be used to browse for a directory and returns the directory name so you can use it in a variable or setup record.

    Sample:
    CREATE(lAutoFileFunctions);
    CLEAR(lVarResult);
    LAutoFileFunctions.FindSetDirectory( lVarResult );
    Rec.”Import Directory” := FORMAT( lVarResult);
    CLEAR(LautoFileFunctions );

    The previous functions FindFirstFile, FindNextFile and FindCloseFile are still in there although you can also use the system record FILE (see reactions on the previous version).

    http://www.mibuso.com/dlinfo.asp?FileID=531

    Discuss this download here.
  • markvandermeijmarkvandermeij Member Posts: 26
    I saw there was a flaw in the new functiion, it doesn't return properly to Navision. I'll look in to it and try to fix this in a new version....
Sign In or Register to comment.