home *** CD-ROM | disk | FTP | other *** search
- <HTML><BODY>
- <%
- ' Method: MakeDir(strDirPathName)
- '
- ' Sample Operation:
- ' Create a sub directory "Godzilla" under "/".
-
- ' 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/
-
- sDir = "Godzilla"
- sDirPathName = Server.MapPath("/") & "\" & sDir
-
- response.write "Directory """ & sDirPathName & """ to be created.<br>"
-
- Set oFDMgt = Server.CreateObject("ASPPW.FDMgt")
- iReturnCode = oFDMgt.MakeDir (sDirPathName)
-
- select case iReturnCode
- case 1: response.write "Operation succeeds.<br>"
- case -1: response.write "Operation failed. "
- case else:
- end select
-
- if oFDMgt.GetLastErrNum <> 0 then
- response.write cstr(oFDMgt.GetLastErrNum) + " " + oFDMgt.GetLastErrDescription + "<br>"
- if oFDMgt.GetLastErrNum= 75 then
- response.write "Directory already exists."
- end if
- end if
-
- Set oFDMgt =nothing
-
- %>
- </BODY></HTML>
-
-
-
-
-
-