asp fso操作类

来源:asp之家 时间:2011-03-07 10:57:00 

代码如下:


<% 
'================================================================ 
'= 系统版本:1.0 = 
'= 文件版本:1.0 = 
'= 文本创建日期:2005-10-31 = 
'================================================================ 
Class Cls_IO 
Private FileSystemObject 

Private Sub Class_Terminate() 
If IsObject(FileSystemObject) Then 
Set FileSystemObject = Nothing 
End If 
End Sub 

'//创建FileSystemObject对象 
Public Function Init_Object() 
On Error Resume Next 
If Not IsObject(FileSystemObject) Then 
Set FileSystemObject = Server.CreateObject("Scripting.FileSystemObject") 
If Err.Number <> 0 Then 
Init_Object = False 
Err.Clear 
Exit Function 
Else 
Init_Object = True 
End If 
End If 
End Function 

Public Sub DeleteFile(ByVal Str) 
On Error Resume Next 
Call FileSystemObject.DeleteFile(Server.MapPath("../UpLoadFile/"&Str)) 
End Sub 

Public Function IsFolder(ByVal Str) 
IsFolder = FileSystemObject.FolderExists(Str) 
End Function 


Public Function ShowFolder(ByVal Str) 
Dim Obj_Folder,Obj_File 
Set Obj_Folder = FileSystemObject.GetFolder(Server.MapPath(Str)) 
Set ShowFolder = Obj_Folder.Files 
Set Obj_Folder = Nothing 
End Function 

End Class 
%>

标签:asp,fso
0
投稿

猜你喜欢

  • python批量从es取数据的方法(文档数超过10000)

    2022-03-23 01:21:48
  • Python数字图像处理代数之加减乘运算

    2023-03-20 07:51:26
  • 数据库复制性能测试 推送模式性能测试

    2012-07-11 16:13:52
  • webpack 打包压缩js和css的方法示例

    2023-07-02 05:18:32
  • golang之数据验证validator的实现

    2024-04-26 17:36:03
  • mysql如何分组统计并求出百分比

    2024-01-22 02:07:51
  • Python3爬虫中关于Ajax分析方法的总结

    2021-04-07 17:28:47
  • 使用JS轻松实现ionic调用键盘搜索功能(超实用)

    2024-04-17 10:26:21
  • 手把手教你使用Python创建微信机器人

    2022-02-11 14:12:29
  • ThinkPHP中URL路径访问与模块控制器之间的关系

    2024-05-05 09:16:40
  • Python实现注册、登录小程序功能

    2022-12-03 17:50:11
  • Python Selenium操作Cookie的实例方法

    2022-10-22 10:21:34
  • Vue2.0利用 v-model 实现组件props双向绑定的优美解决方案

    2024-05-02 17:09:28
  • MySQL表设计优化与索引 (五)

    2010-10-25 20:24:00
  • php+mysql实现简单登录注册修改密码网页

    2024-04-30 08:49:54
  • Python写了个疫情信息快速查看工具实例代码

    2021-10-31 15:26:52
  • Django的URLconf中使用缺省视图参数的方法

    2021-05-03 17:46:29
  • javascript中typeof操作符和constucor属性检测

    2024-05-09 10:37:27
  • Go中JSON解析时tag的使用

    2024-05-09 09:31:52
  • Js nodeType 属性全面解析

    2024-04-16 09:53:30
  • asp之家 网络编程 m.aspxhome.com