ASP / File Manipulation / Determine Filesize
Snippet details
ID: 112
Viewed: 1393
Added: 2002-04-07
Version:
Determine the filesize of a file on your server
<!---Head--->
none
<!---Body--->
'What is the path of the file whose size you're interested in?
Dim strFileName
strFileName = "C:FooBarblah.txt"
'Create an instance of the FileSystemObject
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'Get a file object
Dim objFile
Set objFile = objFSO.GetFile(strFileName)
'Get the file size
Dim iFileSize
iFileSize = objFile.Size
No Reviews to show
