第五章asp的内置组件内容摘要:

和目标文件变量 SourceFile=c:\ipub\root\asptemp\chapter8\ DestiFile=c:\ipub\root\asptemp\chapter8\ SourceFile, DestiFile SourceFile=c:\ipub\root\asptemp\chapter8\ DestiFile=c:\ipub\root\asptemp\chapter8\temp\ SourceFile, DestiFile SourceFile=c:\ipub\root\asptemp\chapter8\temp\ IF (SourceFile) Then SourceFile End If % 文本夹的新建立、复制、移动和删除 • 新建 文件系统对象 .CopyFolder 文件夹名 • 复制 文件系统对象 .CopyFolder 源文件夹名,目标文件夹名 • 移动 文件系统对象 .MoveFolder 源文件夹名,目标文件夹名 • 删除 文件系统对象 .DeleteFolder 文件夹名 • 文件是否存在 文件系统对象 . FolderExists(文件夹名 ) % Dim FileObject 39。 定义一个 FileSystemObject对象实例 Set FileObject=() Dim SourceFolder,DestiFolder 39。 定义源文件夹和目标文件夹变量 39。 新建文件夹 新建 new1文件夹 SourceFolder=c:\ipub\root\asptemp\chapter8\new1 SourceFolder 39。 复制文件夹 将 new1复制为 new2文件夹 SourceFolder=c:\ipub\root\asptemp\chapter8\new1 DestiFolder=c:\ipub\root\asptemp\chapter8\new2 SourceFolder, DestiFolder 39。 移动文件夹 将 new2文件夹移动到 new1下 SourceFolder=c:\ipub\root\asptemp\chapter8\new2 DestiFolder=c:\ipub\root\asptemp\chapter8\new1\new2 SourceFolder, DestiFolder 39。 删除文件夹 如存在,将 new2文件夹删除 SourceFolder=c:\ipub\root\asptemp\chapter8\new1\new2 IF (SourceFolder) Then SourceFolder End If % 显示文本夹下的所有内容 • 我们可以利用 Folder对象来列出文件夹下的所有文件和子文件夹 Folder对象的属性 属 性 说 明 Files 返回文件夹中的所有文件 Folder 返回文件夹中的所有子文件夹 Size 返回指定文件夹大小 % Dim myFileObject 39。 定义一个 FileSystemObject对象实例 Dim myFolder 39。 定义一个 Folde。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。