..:: MX Studio Fóruns ::..: tamanho de arquivo /bytes - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

tamanho de arquivo /bytes

#1 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 2374
  • Joined: 04-November 08

Posted 28 October 2009 - 05:31 PM

Este exemplo de código mostra como recuperar o tamanho de um arquivo, em bytes

CÓDIGO
<%



' declarar variáveis

dim fso, file, ourFile, ourFileSize



' especificar um nome de arquivo

ourFile = "filename.txt"



' Obter o tamanho de arquivo

Set fso = Server.CreateObject("Scripting.FileSystemObject")

Set file = fso.GetFile(ourFile)

ourFileSize = file.Size

'Limpar variáveis

Set file = nothing

Set fso = nothing



'OurFileSize  tamanho do arquivo

'De ourFile, em bytes

%>

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)