sol5-5.vbs
来自「Apress - Managing Enterprise Systems Wit」· VBS 代码 · 共 17 行
VBS
17 行
'set read-only and toggle hidden attribute for a file
Const ReadOnly = 1
Const Hidden = 2
Dim objFSO, objFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
'get a reference to a file
Set objFile = objFSO.GetFile("e:\data\report.doc")
'set the Readonly attribute
objFile.Attributes = objFile.Attributes Or ReadOnly
'toggle the Hidden attribute
objFile.Attributes = objFile.Attributes Xor Hidden
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?