Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/09/2004, 09:04
Avatar de Saruman
Saruman
 
Fecha de Ingreso: mayo-2003
Ubicación: Panama city, Panama, Panama
Mensajes: 1.154
Antigüedad: 22 años, 1 mes
Puntos: 5
chequea esta funcion que tengo:

Código:
Function FileSize(Path, FileName, Tipo)
		set FSO = Server.CreateObject("Scripting.FileSystemObject")
		set oFile = FSO.GetFile(Server.MapPath(Path & FileName))
	
		FileSize = oFile.Size
		
		select case Tipo
			case 2:
				FileSize = Round(FileSize / 1024, 2)
			case 3:
				FileSize = Round(FileSize / 1048576, 2)
			case 4:
				FileSize = FileSize & " bytes"
			case 5:
				FileSize = Round(FileSize / 1024, 2) & " KB"
			case 6:
				FileSize = Round(FileSize / 1048576, 2) & " MB"
			case 7:
				if FileSize > 0 and FileSize < 1024 then
					FileSize = FileSize & " bytes"
				elseif FileSize >= 1024 and FileSize < 1048576 then
					FileSize = Round(FileSize / 1024, 2) & " KB"
				elseif FileSize >= 1048576 then
					FileSize = Round(FileSize / 1048576, 2) & " MB"
				end if
			case else
				FileSize = FileSize
		end select
		
		set oFile = nothing
		set FSO = nothing
End Function
__________________
Saruman

One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them.