Open, Read and Create Files with ASP

Tutorials Shared by the Internet Community

Advertisements


Open, Read and Create Files with ASP

This tutorial explains opening, reading and creating files using example codes. Up to 6 examples are used.

Statistics

  • Total Hits - 33887

  • Total Votes - 106 votes

  • Vote Up - 43 votes

  • Vote Down - 63 votes

  • Domain - www.asptutorial.info

  • Category - ASP/File Manipulation

  • Submitted By - Devesh Khanna

  • Submitted on - 2008-03-06 11:26:15

Description

This one will be the basic code we need to open a text file:

<%
Set fs = CreateObject("Scripting.FileSystemObject")

Set wfile = fs.OpenTextFile("c:\Mydir\myfile.txt")
filecontent = wfile.ReadAll

wfile.close
Set wfile=nothing
Set fs=nothing

response.write(filecontent)
%>    More detail...


Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements