
13/06/2003, 11:21
|
 | | | Fecha de Ingreso: febrero-2002 Ubicación: España
Mensajes: 2.364
Antigüedad: 23 años Puntos: 1 | |
Leer fichero de texto y contar las palabras <%
'Leer contenido de un fichero de texto en el servidor y contar las palabras
set FSO = Server.CreateObject("Scripting.FileSystemObject")
set oFich = FSO.OpenTextFile(Server.MapPath("prueba.txt"))
texto= replace(oFich.ReadAll,chr(13), " ")
oFich.Close
set oFich = nothing
Archivo = Split(texto," ")
for palabras = 0 to ubound(archivo)
response.write("Linea=" & palabras +1 & " - " & archivo(conta) &"<br>")
next
%> |