首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

ASP实例教程:FileSystemObject对象

整理日期:2008年08月13日 【字体:

  FileSystemObject 对象

  指定的文件存在吗?

  本例演示如何首先创建FileSystemObject对象,然后使用FileExists方法来探测某文件是否存在。

  本示例代码如下:

  <html>
  <body>
  <%
  Set fs=Server.CreateObject("Scripting.FileSystemObject")
  If (fs.FileExists("c:\windows\cursors\xxx.cur"))=true Then
  Response.Write("文件 c:\windows\cursors\xxx.cur 存在。")
  Else
   Response.Write("文件 c:\windows\cursors\xxx.cur 不存在。")
  End If
  set fs=nothing
  %>
  </body>
  </html>

  本实例运行结果如下:

  文件 c:\windows\cursors\xxx.cur 不存在。

  指定的文件夹存在吗?

  本例演示如何使用FolderExists方法探测某文件夹是否存在。

  本示例代码如下:


伊图教程网[www.etoow.com]
http://www.etoow.com/html/2008-08/1218591613.html
  <html>
ASP实例教程:FileSystemObject对象
'http://www.etoow.com/html/2008-08/1218591613.html
1
 
23
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved