943,749 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 1400
  • ASP RSS
Sep 17th, 2009
0

using fs.OpenTextFile without .TXT

Expand Post »
I need to write to a textfile and name it with an extension other than ".txt" (an archive file) . For example: myfile.123
I can't seem to get around the file system object adding ".txt" so my filename becomes myfile_123.txt
Do I need to write it another way or is there some way to do this with fso, which I'm comfortable with?
My (nonworking) code:

ASP Syntax (Toggle Plain Text)
  1. Conn = fs.OpenTextFile("c:/inetpub/wwwroot/app/files/f.123", 2, True)
  2. for each obj in s
  3. Conn.WriteLine( obj & "'" )
  4. next obj
  5. Conn.Close()
Last edited by peter_budo; Sep 27th, 2009 at 8:33 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
jimib is offline Offline
23 posts
since May 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: How Do I Show A Selected Specific Record
Next Thread in ASP Forum Timeline: Executing .vbs from .asp





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC