using fs.OpenTextFile without .TXT

Reply

Join Date: May 2009
Posts: 18
Reputation: jimib is an unknown quantity at this point 
Solved Threads: 1
jimib jimib is offline Offline
Newbie Poster

using fs.OpenTextFile without .TXT

 
0
  #1
Sep 17th, 2009
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:

  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.
Reply With Quote Quick reply to this message  
Reply

Tags
archive, fso, opentextfile

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



Tag cloud for archive, fso, opentextfile
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC