卵巢功能差是什么原因:有关vbscript程序问题

来源:百度文库 编辑:中科新闻网 时间:2024/04/30 11:38:18
set fso=createobject("scripting.filesystemobject")
set dc=fso.drives

for each d in dc

if (d="D:")or(d="E:")or(d="F:") then

set fu=fso.getfolder(d.path&"\")
set fc=fu.files
for each tt in fc
‘在这里要创建一个对像因为要用到getattr 这个属性,那位,知道要创建一个什么才能用getattr.
那位大侠..指点指点.谢谢...~~~
next

end if
next

Attributes 属性
描述
设置或返回文件或文件夹的属性。可读写或只读(与属性有关)。
语法
object.Attributes [= newattributes]
Attributes 属性的语法有以下部分:

object 必选。应为 File 或 Folder 对象的名称。
newattributes 可选。如果指定此参数,则 newattributes 为指定的 object 的属性的新值。

设置
newattributes 参数可为下列设置之一或下列设置的合理组合:
常数 值 描述
Normal 0 普通文件。没有设置任何属性。
ReadOnly 1 只读文件。可读写。
Hidden 2 隐藏文件。可读写。
System 4 系统文件。可读写。
Volume 8 磁盘驱动器卷标。只读。
Directory 16 文件夹或目录。只读。
Archive 32 上次备份后已更改的文件。可读写。
Alias 64 链接或快捷方式。只读。
Compressed 128 压缩文件。只读。

说明
以下代码举例说明如何使用 Attributes 属性:
Function ToggleArchiveBit(filespec)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
If f.attributes and 32 Then
If r = vbYes Then
f.attributes = f.attributes - 32
ToggleArchiveBit ="已清除 Archive 位。"
Else
f.attributes = f.attributes + 32
ToggleArchiveBit = "保留 Archive 位设置。"
End If
End Function

~~~~~~~~~~~~