Easy code for creating a file
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: 3076
Total Votes: 36 votes
Category: ASP/File Manipulation
Submitted on: 2008-03-06 10:05:16
Submitted By: Devesh Khanna
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 |
|---|---|---|
![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() ![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() ![]() ![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() 16.67% |
6 |





16.67%

16.67%

16.67%

16.67%

16.67%