Hola, tengo un problema con un Script que utiliza el FileSystemObject. Me funciona perfectamente en una maquina con Win 2000, pero cuando lo intento poner en win 2000 Server se queda "pensando" y no funciona ni da ningún error. ¿Puede ser problema de permisos? he probado ha todo tipo de permisos a la carpeta en cuestion "fotos" incluidos los de invitado e IUSR_...
El codigo en cuestion es el siguiente:
<%@ Language=VBScript %>
<%
Function MostrarFiles(ruta)
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject" ;)
Set f = fso.GetFolder(ruta)
Set fc = f.Files
For Each f1 in fc
s = s & f1.name & "&nbsp;&nbsp;&nbsp;"& f1.size & " bytes."
s = s & "<BR>"
Next
MostrarFiles = s
End Function
%>
<html>
<head>
<title>kk</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%=MostrarFiles("c:\Inetpub\wwwroot\fotos\ ")%>
</body>
</html>
Sin embargo el sigiente codigo funciona perfectamente en ambas maquinas.
<%@ Language=VBScript %>
<%
Function MostrarListaDeUnidades
Dim fso, d, dc, s, n
Set fso = CreateObject("Scripting.FileSystemObject" ;)
Set dc = fso.Drives
For Each d in dc
s = s & d.DriveLetter & " - "
If d.DriveType = Remote Then
n = d.ShareName
ElseIf d.IsReady Then
n = d.VolumeName
End If
s = s & n & "<BR>"
Next
MostrarListaDeUnidades = s
End Function
%>
<html>
<head>
<title>MostrarListaDeUnidades</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%=MostrarListaDeUnidades%>
</body>
</html>
Por favor, necesito ayuda urgente.
Un saludo y GRACIAS :)