Measuring File Sizes

G

Griff

I've written an ASP file that queries a database and gets the full path to a
database file, e.g.

"C:\Program Files\Microsoft SQL Server\MSSQL\Data\myDatabase.mdf"

I've then used the Scripting.FileSystemObject to identify the size of the
file.

oFSO.GetFile(sPath).Size

It claims that the file does not exist....(when it definitely does!)

I wondered whether this was to do with spaces in the file path, but I've
proved that that is not the case.

The EXACT code copied into a VB exe works fine.

What's going on?

Thanks

Griff
 
C

Curt_C [MVP]

Griff said:
I've written an ASP file that queries a database and gets the full path to a
database file, e.g.

"C:\Program Files\Microsoft SQL Server\MSSQL\Data\myDatabase.mdf"

I've then used the Scripting.FileSystemObject to identify the size of the
file.

oFSO.GetFile(sPath).Size

It claims that the file does not exist....(when it definitely does!)

I wondered whether this was to do with spaces in the file path, but I've
proved that that is not the case.

The EXACT code copied into a VB exe works fine.

What's going on?

Thanks

Griff
What user is IIS/ASP running under? It may not have permission to the
file, or to the FSO object. Try some different tests with that and see
what happens.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top