Read Only Part Of A file (ASP)

 

The following script will read only part of the following text file “asptext.txt” on your server. It will read the first five characters from the text file.

 

Script Source

 

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

Set f=fs.OpenTextFile(Server.MapPath("asptext.txt"), 1)
Response.Write(f.Read(5))
f.Close

Set f=Nothing
Set fs=Nothing
%>

 

Please let me know if this script was helpful to you.

[rating]