Writing to Textfiles

Results 1 to 4 of 4

Thread: Writing to Textfiles

  1. #1
    Trish Guest

    Default Writing to Textfiles

    Hi,<BR>I am having problems writing to a textfile, I am working on PWS and when I write to the A/C drive it works perfectly, but when I connect to it from another PC on the same network(that doesnt run PWS), it doesnt allow me to save the textfile to any drive, instead it saves it to the C Drive of the PC that my files are on!!<BR><BR>any ideas???<BR>

  2. #2
    Elliot Guest

    Default RE: Writing to Textfiles

    Does you have a drive mapped to the other PC? If so, you may have to use the GetDrive method on your local machine (point it to the network drive), and work from there... <BR><BR>I have had similar issues, however... Turned out to be a permissions problem; I did not have write access to the folder I was trying to create a textfile on

  3. #3
    Trish Guest

    Default RE: Writing to Textfiles

    No I havent mapped the drive, but I cant even write to the A drive and their are no permission problems on that,<BR><BR>strFileName = ""&dest&"Report.txt"<BR>this is the file path I am using, (dest being A:/)so it should save to the A drive as A:/report.txt, but for some reason it will not do this on any machine but the one my files are on.

  4. #4
    Join Date
    Dec 1969

    Default RE: Writing to Textfiles

    The problem is that you are mixing server and client side logic.<BR><BR>You are asking the server script (in ASP) to save a text file to the A drive of a client computer. This solution won&#039;t work. The Server Side script can not write a file to a drive on the client machine. That&#039;s why it works on the machine running PWS, because that machine is both client and server.<BR><BR>One possibility is to save the file on the server and build a page with a link to the newly created file. Then, ask the user to right click the link and choose &#039;Save Target As&#039; to save the file to their local machine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts