Options

NAS 3.70 and Windows Explorer

timgranttimgrant Member Posts: 15
Hi,

I'm implementing NAS with the ability to read in and process txt files from a network folder. I read them in based on a command and date / time stamp included in the text file name to determine their content and sort order. The problem I'm having it is that I set a variable to the file table to locate the text file(s) and NAS waits for the files as they arrive from another system. This all works fine when I start the NAS service. but when the code loops back round in the time, it refuses to acknowledge any new text files added to the folder there after.

Is there a locked cache in NAS stopping it seeing new text files after the first code loop?

Some of the code goes like this...

CLEAR(RecFile);
RecFile.RESET;
RecFile.SETRANGE(Path, TxtQFMOut + RecDBSetup."Folder Path Name");
RecFile.SETRANGE("Is a file", TRUE);
RecFile.SETFILTER(Name, 'PRORDE*.txt');
IF RecFile.FIND('-') THEN BEGIN
REPEAT
......

Any ideas?

Many Thanks

Tim

Comments

  • DenSterDenSter Member Posts: 8,307
    Change one of the filters, do a read, change that filter back to the original value and do the same read again.
  • timgranttimgrant Member Posts: 15
    Many Thanks, you're a star. In hindsight, a simple way round it, though I thought I was going nuts looking at it.

    Bit of an own goal for the Navision NAS Service IMO

    Many Thanks Again.

    Tim
  • DenSterDenSter Member Posts: 8,307
    It's weird though, you shouldn't have to set the filter twice to read the content of a folder, but once you know that you have to do it that way, it's an easy thing :mrgreen:
Sign In or Register to comment.