Dim objFolder, objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\Scripts")
objFolder.Attributes = 2048
I don't get any errors, just nothing happens. I can hide the folder and turn
on the archive flag using this method.
This vb program (easily found with google) might inspire you ;-)
http://www.visualbasic.happycodings.com/Files_Directories_Drives/code8.html
WMI does this pretty easily. Get the WMI Code Creator. Google for
it. It's a real time saver.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\CIMV2")
Set objShare = objWMIService.Get("Win32_Directory.Name='c:\'")
Set objOutParams = objWMIService.ExecMethod("Win32_Directory.Name='c:
\dell'", "Compress")