3 Replies Latest reply: May 29, 2009 3:25 PM by 807581 RSS

    Reading Files From Network Share

    807581
      I am attempting to read files on a shared volume of a Windows 2003 machine from a Forte client (win2k - 5.0.26). If doing this is possible, how does one reference a remote file?

      Thanks,
      -skynet-
        • 1. Re: Reading Files From Network Share
          807581
          file "test.txt" on a server named "fileserver" in a shared dir "shareddir"

          aFile : File = new();
          aTextData : TextData = new();

          aFile.SetLocalName('\\\\fileserver/shareddir/test.txt');
          // or you can use the \
          aFile.SetLocalName('\\\\fileserver\\shareddir\\test.txt');


          aFile.Open(SP_AM_READ, FALSE);
          aFile.ReadText(aTextData);
          aFile.Close();

          task.Part.LogMgr.PutLine(aTextData);

          wuz it your question?
          • 2. Re: Reading Files From Network Share
            807581
            Fortever,

            Thanks for the quick response. Your code segment is what I thought it would be. However, when I try that, I get:

            SYSTEM ERROR: System Error: No such file or directory, opening
            '\\devServer\testDir\test.txt' with mode 'rb'
            Class: qqos_FileResourceException
            Error #: [101, 184]
            Detected at: qqos_File::Open at 4

            I'm using forte version 5.0.26. Is it possible that this is something that is corrected in a later version?

            Thanks,
            -skynet-
            • 3. Re: Reading Files From Network Share
              807581
              Just tested for the sake of it, works fine in 5.0.1

              If you can see the file from the File Explorer there is no reason why this should not work ... one other thing may be a firewall on either the Win2k Forté the Win2003 file server preventing the connection.