Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

How can I read all the files from a path?

$
0
0
Hi all,
I have a problem when I want to read some files from my Lan network directory. The Code is like:
  CLEAR(rlFile);
  rlFile.SETRANGE(Path, '\\AnotherServer\MyDirectory\');
  rlFile.SETRANGE("Is a file", TRUE);
  IF rlFile.FINDSET THEN
    REPEAT
      vFile := rlFile.Path + rlFile.Name;
      vRutaServidor := cFileManagement.UploadFileSilent(vFile );
      flFile.OPEN(vRutaServidor);
      flFile.CREATEINSTREAM(InStream);
      XMLPORT.IMPORT(50009,InStream);
      flFile.CLOSE;
   UNTIL rlFile.NEXT = 0;

Depending on witch is the path (\\MyServer\MyDirectory\) or local one, it finds files or not. For example, in \\MyServer\MyDirectory\ doesn't find any file (there are) but if I put this, it finds correctly:
    vFile := '\\AnotherServer\MyDirectory\myfile.XML';
    vRutaServidor := cFileManagement.UploadFileSilent(vFile);
    flFile.OPEN(vRutaServidor);
    flFile.CREATEINSTREAM(InStream);
    XMLPORT.IMPORT(50009,InStream);
    flFile.CLOSE;

What can be the problem? path permissions (but it allows me to get 1 file)...
If someone can helps me, I would be grateful.

Thank you.

Viewing all articles
Browse latest Browse all 10032

Trending Articles