4 Replies Latest reply on Sep 7, 2008 8:27 AM by murpg

    Reading a file

    murpg
      I have a text file on a W2K file server on my network that I need to retrieve by a ColdFusion Server on the same network how might I accomplish this?

      I have tried this.
      <cffile action="read" file="Z:\my_data.txt" variable="myData" />
      An error occurred when performing a file operation read on file Z:\my_data.txt.
      The cause of this exception was: java.io.FileNotFoundException: Z:\my_data.txt (The system cannot find the path specified).
      I have tried this.
      <cfscript>
      oFile = FileOpen("Z:\my_data.txt", "read");
      </cfscript>
      I have Tried the server name and IP like this.
      <cfscript>
      oFile = FileOpen("D:\192.168.1.10\Public\Installs\my_data.txt", "read");
      </cfscript>