Saving text file to local floppy

Results 1 to 2 of 2

Thread: Saving text file to local floppy

  1. #1
    Join Date
    Dec 1969

    Default Saving text file to local floppy

    I want the user to download a list onto a floppy on their LOCAL floppy drive. The script I have written creates a text file with the necessary information but it saves it to the server root directory. When I try to change the paths it tells me the path was not found. Can someone please help.<BR>My script is show below:<BR><BR>*******************<BR>&#060;%<BR>if not isempty(Request.Form ("btn1")) then<BR><BR>set Conn = server.CreateObject ("adodb.connection")<BR> Conn.Open "&#060;DSN&#062;", "&#060;Userid&#062;", "&#060;password&#062;"<BR> <BR> set rstemp1 = conn.Execute ("select MIS_ID from PO_DATA where Dt &#062; &#039 2000/04/07&#039")<BR><BR> <BR><BR>set FileStreamObject = createobject("scripting.FileSystemObject")<BR><BR> set WriteStream = _<BR> &#039THIS IS WHERE THE PROBLEM IS - IN THE PATH<BR> FileStreamObject.CreateTextFile (server.mappath _<BR> ("\") & " extfile.txt", True)<BR> <BR> do until rstemp1.eof<BR> WriteStream.writeline rstemp1("MIS_ID")<BR> rstemp1.movenext<BR> loop<BR> WriteStream.Close<BR><BR> <BR> <BR>else<BR>%&#062;<BR><BR>&#060;form method="post" action="textfile.asp"&#062;<BR>&#060;input type="submit" name="btn1"&#062;<BR>&#060;/form&#062;<BR><BR>&#060;% end if %&#062;<BR>*************************************** **************

  2. #2 Guest

    Default RE: Saving text file to local floppy

    The reason why you can&#039t write info to the client&#039s floppy disk is that the asp code is executed on the server, not on the client machine. To acchieve what you want, you would have to use a download component which would take the file you create and download it. Look at

Posting Permissions

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