Strange FileSystem Behavior

Results 1 to 3 of 3

Thread: Strange FileSystem Behavior

  1. #1
    Bill Anthony Guest

    Default Strange FileSystem Behavior

    I have constructed a form, whereby, a user can enter information in three textarea fields; and upon submit, the form will perform the following tasks:<BR><BR>1. Open an instance of the FileSystem object<BR>2. Create a folder on the server in the name the user specifies.<BR>3. Create three files within that folder with predetermined names.<BR>4. Populate those three files with text from the three separate textarea fields.<BR><BR>Everything performs flawlessly and it does exactly what I want it to do. The issue, however, is in reading these files. I have already established a separate ASP page that will read text files off the server with no problems. However, when I try to read the text files that are created by the form process stated above, I get a return of only three characters. The first two characters are "junk characters" and the third is the first letter of the text that was supplied by the original form (hope everyone can follow that).<BR><BR>To illustrate further:<BR><BR>folder/--<BR> &#124-- file01.txt &#060;-------- Files created by NOTEPAD<BR> &#124-- file02.txt &#060;-------- can be read easily with<BR> &#124-- file03.txt &#060;-------- my READ.ASP page<BR><BR>folder/-- &#060;-------- Same folder and file <BR> &#124-- file01.txt &#060;-------- structure created by<BR> &#124-- file02.txt &#060;-------- WRITE.ASP; but cannot be<BR> &#124-- file03.txt &#060;-------- read with same READ.ASP<BR><BR>The files I create with my WRITE.ASP page cannot be read with my READ.ASP; even though they are creating simple text files.... yet if I go into the SAME folder and delete those files which were created by the WRITE.ASP script; then, create new ones in their place with NOTEPAD.EXE -- they can suddenly be read by my READ.ASP script. <BR><BR>Why does this happen? Aren&#039t text files equal to.... um..... text files? Am I missing something very important here? Any suggestions or guidance would certainly be helpful. Thanks in advance!<BR><BR>Bill Anthony<BR>Ellington, CT<BR>

  2. #2
    Volker Guest

    Default RE: Strange FileSystem Behavior

    What happens, if you view the files created by your ASP-Script<BR>with the notepad? Do they look excatly the same there like the files created by the notepad?<BR>May be, when you write the files in your ASP, you dont open it as a textfile and you write just binarydata?<BR><BR><BR>

  3. #3
    Bill Anthony Guest

    Default RE: Strange FileSystem Behavior

    Volker - I appreciate your input tremendously.<BR><BR>Yes. When I use NOTEPAD.EXE to open the files created by the WRITE.ASP script, they read as normal. The folder I create with the script is created using the "CreateFolder" object and the subsequent files are created using the "CreateTextFile" object.<BR><BR>My issue remains unresolved at this point.

Posting Permissions

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