you could use the FSO (File System Object)
Code:
function getFileSize(filename)
dim objFSO,movFile
Set objFSO= CreateObject("Scripting.FileSystemObject")
Set movFile= objFSO.GetFile(server.mappath(filename))
getFileSize= movFile.size
set movFile = nothing
set objFSO = nothing
end function
filename should include the relative path to the file as well
so;
Code:
MovieName = "armageddon.avi"
MoviePath = "/movies/a/"
FileSize = getFileSize(MoviePath & MovieName)
strSQL = "UPDATE table SET sizefield = " & FileSize & " WHERE namefield = " & MovieName & " ;"
you could also set this into a loop to run through each file in any given folder
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|