Home > Archive > ASP > June 2005 > Measuring File Sizes
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Measuring File Sizes
|
|
|
| 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
| |
| Curt_C [MVP] 2005-06-10, 3:55 pm |
| Griff wrote:
> 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.
--
Curt Christianson
site: www.darkfalz.com
blog: blog.darkfalz.com
|
|
|
|
|