求VBS设置指定文件属性的脚本

来源:百度知道 编辑:UC知道 时间:2024/06/01 02:58:12

支持拖放功能 你只需把要处理的文件拖放到该vbs文件上即可

For Each a In WScript.Arguments
w=w&a
Next

set fso=createobject("scripting.filesystemobject")
set file=fso.getfile(w)

n=0

a=msgbox("是否加只读属性?",vbOKCancel,"" )
If a = 1 Then
n=n+1
end if

b=msgbox("是否加隐藏属性?",vbOKCancel,"" )
If b = 1 Then
n=n+2
end if

c=msgbox("是否加系统属性?",vbOKCancel,"" )
If c = 1 Then
n=n+4
end if

file.attributes=n