Ver Mensaje Individual
  #64 (permalink)  
Antiguo 13/06/2003, 11:21
Avatar de maestro
maestro
 
Fecha de Ingreso: febrero-2002
Ubicación: España
Mensajes: 2.364
Antigüedad: 22 años, 2 meses
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
%>
__________________
Jose Maria Fernandez
[email protected]
Http://www.expansionweb.net