home *** CD-ROM | disk | FTP | other *** search
- <HTML><BODY>
- <%
- ' Method: ReadFileLength(strFileName)
- '
- ' Sample Operation:
- ' Read file size of sample.txt.
- '
- ' This file is provided as part of ASP Power Widgets Samples
- '
- ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT
- ' WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
- ' INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
- ' OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
- ' PURPOSE.
-
- ' Copyright 1997-1998. All rights reserved.
- ' Dalun Software Inc. ASP Power Widgets
- ' http://www.dalun.com
- ' http://members.tripod.com/ActiveServerPage/
-
-
- sFileName = "sample.txt"
- sFileName = Server.MapPath("/") & "\" & sFileName
-
- response.write "File length of """ & sFileName & """ to be readed.<br>"
-
- Set oFDMgt = Server.CreateObject("ASPPW.FDMgt")
- lReturnCode = oFDMgt.ReadFileLength(sFileName)
- if lReturnCode = -1 then
- response.write "File not found."
- else
- response.write "The file length is: " & CLng(lReturnCode) & "."
- end if
-
- Set oFDMgt = nothing
-
- %>
- </BODY></HTML>
-
-
-
-
-
-