|
-
Jul 6th, 2001, 07:13 AM
#1
Thread Starter
Hyperactive Member
Filesize in ASP
I have the file path of a file, and now want to find out the size of this file. Is there anyway that I can do this in ASP?
ASP, PHP, VB, JavaScript, CSS, HTML, a little C and a little CGI.
Richard Whitehouse.
Join the Footie Predictions League
"Make it idiot proof and someone will make a better idiot."
-
Jul 6th, 2001, 12:52 PM
#2
Black Cat
You could write a COM DLL in VB you could call from ASP to get the info. Look into the FindFirstFile API call and the WIN32_FIND_DATA structure.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jul 6th, 2001, 01:05 PM
#3
Hyperactive Member
Code:
Dim fs
Dim f
Dim vSize
Set fs = Server.CreateObject("Scripting.FileSystemObject")
if fs.FileExists(strFileName) then
set f = fs.GetFile(strFileName)
vSize = f.size
else
........
End if
Set f = Nothing
Set fs = nothing
-
Jul 6th, 2001, 01:26 PM
#4
Black Cat
Um, or you could do it the easy way...
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|