KB Issue
ASP Classic throws a type mismatch error when getting the size of a file if it is not formatted correctly.
Issue Details
When using a function in ASP Classic to get the file size will give you a type mismatch error if the formatting is not correct.
Recreate Issue
The following lines will give you the type mismatch error "sometimes"

Filesize = bytes / 1024
Copy
Search Site
Search Google
Resolve Issue
Taking the code from above, we need to add CDbl
Copy
Search Site
Search Google
.

Filesize = CDbl(trim(bytes)) / 1024
Copy
Search Site
Search Google