Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/05/2002, 17:04
Avatar de DARIOI
DARIOI
 
Fecha de Ingreso: mayo-2001
Ubicación: Gotland-Visvy
Mensajes: 181
Antigüedad: 24 años
Puntos: 0
Re: FSO para archivos en red.

prueba esta otra:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY bgcolor='#ffcc00'>
<FONT color=#660033 size=5><B>Propiedad DriveType</B></FONT></br>
<%
'Descripción
'Devuelve un valor que indica el tipo de una unidad especificada.
'Sintaxis
'objeto.DriveType
'objeto siempre es un objeto Drive.
'Comentarios
'El siguiente código muestra el uso de la propiedad DriveType:
'Function MostrarTipoDeUnidad(unidadruta)
'Dim fso, d, t
'Set fso = CreateObject("Scripting.FileSystemObject&quot ;)
'Set d = fso.GetDrive(unidadruta)
'Select Case d.DriveType
'Case 0: t = "Desconocida"
'Case 1: t = "Removible"
'Case 2: t = "Fija"
'Case 3: t = "Red"
'Case 4: t = "CD ROM"
'Case 5: t = "Disco RAM"
'End Select
'MostrarTipoDeUnidad = "Unidad " & d.DriveLetter & ": - " & t
'End Function
%>

<%
'01
Sub MostrarTipoDeUnidad(unidadruta)
Dim fso, d, t
Set fso = CreateObject("Scripting.FileSystemObject&quot ;)
Set d = fso.GetDrive(unidadruta)
Select Case d.DriveType
Case 0: t = "Desconocida"
Case 1: t = "Removible"
Case 2: t = "Fija"
Case 3: t = "Red"
Case 4: t = "CD ROM"
Case 5: t = "Disco RAM"
End Select
'MostrarTipoDeUnidad = "Unidad " & d.DriveLetter & ": - " & t
response.write "Se encontro : <BR>"
response.write "" & t
End sub
MostrarTipoDeUnidad ("E:")

%>
<br><center><a href='javascript:window.close()'>Cerrar Ventana</a></center><BR>
<center><HR><font size='1' face='verdana' color='red'><b>CRIMAKETEMPLATE HOSTING</b></font></center><BR>
<center><font size='1' face='verdana' color='red'><i><b>Versión.1.0</b></i></font></center><BR>
</BODY>
</HTML>