Home
Developer Blog
Ajax effects
CSS examples
Freelance jobs
Hot IT Jobs
Hot scripts
Code samples
Web hosting directory
Lotus Notes FAQ
See the new scripts recently added to Dynamic Drive.
Click here
.
Original, practical
CSS codes and examples
such as CSS menus for your site.
Search code samples
Keyword
All Categories
ASP
CSS
Dhtml
Html
Javascript
PHP
Code Samples
ASP
CSS
Dhtml
Html
Javascript
PHP
LOGIN HERE
Username
Password
Signup Now
Forgot Password
Verify Signup
ASP >> General
How can I determine the file size of a file?
Visitor Ratings (0) :
Description
One of the properties of the File object is Size, which returns the size of the file in bytes. The FileSystemObject contains a method, GetFile(FilePath), which will return a File object that represents the file specified by FilePath.
Code
Select All
Function ShowFileSize(filespec) Dim fso, f, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFile(filespec) s = UCase(f.Name) & " uses " & f.size & " bytes." ShowFileSize = s End Function
Rate this Resource
0
1
2
3
4
5
6
7
8
9
10