NAS not seeing new files on a file server

megawavezmegawavez Member Posts: 133
Hi, I'm having a strange error with our NAS server. It's supposed to check for files in a particular directory, then read the files in. It seems to work for a period in time, then the NAS server stops seeing new files on the file server. I even forced a restart of the NAS every 10 minutes, but no success.

If I manually close the NAS server (it's a command prompt) and restart, it's starts working again.

Has anybody seen this problem?

Thanks !

Comments

  • vaprogvaprog Member Posts: 1,141
    Are you using the NAV virtual File table?
    You need to reset it before rereading. Otherwise it will not refresh the table contents from the filesystem.
  • megawavezmegawavez Member Posts: 133
    vaprog wrote:
    Are you using the NAV virtual File table?
    You need to reset it before rereading. Otherwise it will not refresh the table contents from the filesystem.

    Here's the code (scanFile is a file record). I was getting oddities with the .FIND('-') - doing two finds seemed to fix the problem -

    SELECTLATESTVERSION();

    scanFile.RESET();
    scanFile.SETCURRENTKEY(Path, "Is a file", Name);
    scanFile.SETRANGE(Path, iSubDir);
    IF scanFile.FIND('-') THEN;

    SELECTLATESTVERSION();

    scanFile.RESET();
    scanFile.SETCURRENTKEY(Path, "Is a file", Name);
    scanFile.SETRANGE(Path, iSubDir);
    scanFile.SETRANGE("Is a file", TRUE);
    scanFile.SETFILTER(Name, iFileFilter);
    IF scanFile.FIND('-') THEN REPEAT
    oFoundList.Key := scanFile.Name;
    IF oFoundList.INSERT() THEN;
    UNTIL scanFile.NEXT() = 0;
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • ppavukppavuk Member Posts: 334
    OMG, where is LIKE button!
Sign In or Register to comment.