Easy code for creating a file

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

Easy code for creating a file

This example shows how to create a text file and then write some text to it.
http://tutorials.programmingsite.co.uk/aspcreatefile.php
  • Total Hits: 14377

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 144 votes

  • Category: ASP/File Manipulation

  • Submitted on: 2008-03-06 10:05:16

  • Submitted By: Devesh Khanna

  • Set as Favorite

Description:

<%
'declare our variables
Dim objFSO , myFile
'create an instance of the FileSystemObject
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'create a text file called mytestfile.txt , this was created on the d drive
Set myFile = objFSO.CreateTextFile("d:\mytestfile.txt ", True)
'write a couple of lines of text in the file
myFile.WriteLine("This is just some sample text. ")
myFile.WriteLine("more sample text")
myFile.Close
'destroy the object
Set myFile = Nothing
Set objFSO = Nothing
%>    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 38.19%  55
 Two starsTwo star  Vote LeftVote MiddleVote Right 10.42%  15
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 11.81%  17
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 11.11%  16
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 28.47%  41

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.






Advertisements