⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hidefile.vbs

📁 Apress - Managing Enterprise Systems With The Windows Script Host Source Code
💻 VBS
字号:
'hidefile.vbs
Dim objFileSystem, objFile

'check if the parameter count is a single parameter. 
' If not then show the command syntax
If WScript.Arguments.Count<>1 Then 
WScript.Echo " Syntax: " & WScript.ScriptName &  _   
"  FileName " & vbCrLf & _
         " Filename: the path of the file you wish to hide"
       WScript.Quit
End If

 'create FileSystem object
 Set objFileSystem = CreateObject("Scripting.FileSystemObject")
 On Error Resume Next
 'get the file specified in command line 
 Set objFile = objFileSystem.GetFile(WScript.Arguments(0))
 'check if error occured - file not found
 If Err Then 
     WScript.Echo "Error:File:'" & WScript.Arguments(0) & "' not found" 
 Else
     objFile.Attributes = 2
 End If

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -