sol17-5.vbs
来自「Apress - Managing Enterprise Systems Wit」· VBS 代码 · 共 15 行
VBS
15 行
Dim objSecurity, objSD, strSource, strDest, objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objSecurity = CreateObject("ADsSecurity")
strSource = "d:\data\report.doc"
strDest = "d:\backup\report.doc"
'copy the file to the destination
objFSO.CopyFile strSource, strDest
' get the security descriptor for the file
Set objSD = _
objSecurity.GetSecurityDescriptor("FILE://" & strSource)
'copy the security descriptor from the original file to the copied file
objSecurity.SetSecurityDescriptor objSD, "FILE://" & strDest
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?