|
Technical Interview Questions
Visual Basic Interview Question
.NET Web Interview Questions
.NET
Interview Questions
C#
Interview Questions
.........More
Source Codes
Asp .NET Source Codes
Asp VB Script Source Codes
.........More
Soft Skills
Communication Skills
Leadership Skills
.........More
|
|
Asp/VB Script Source Codes
Append to a File 1
Append to a File
<%
Set myText = "Hi, I am writing to a file "
Set fs = CreateObject("Scripting.FileSystemObject")
filename = server.mappath("/somedirectory/appendfile.txt")
Set thisfile = fs.OpenTextFile(filename,8,True)
thisfile.writeline(myText)
thisfile.close
Set thisfile = Nothing
Set fs = Nothing
%>
Notice the numbers 1,2 and 8 in the above examples. Here is what they represent
1: Opens file for reading. Cannot write to this file
2: Opens file for writing. This file can't be read. Writing anything to this
file would overwrite the previous contents.
8: Opens the file for appending. The previous contents is not overwritten.
Notice the "True" and "False" parameters in examples above
True: The file will be created if it doesn't exist
False: A new will not be created if it doesn't already exist.
<<<----- Return to
Asp/VB Script Source
Code Questions Page.
Have a Question ?
post your questions here. It
will be answered as soon as possible.
Check
Microsoft .Net Interview Questions
for more Microsoft
.Net Interview Questions with Answers.
Check
.Net Database Interview
Questions for more .Net Database Interview Questions with answers
Check
Job Interview Questions
for more Interview Questions with Answers
|