So I have the making's of a script that should work. But, i'm still missing the concept of how to set the value of the attribute. Any suggestions, Thanks!
Const SYNCHRONIZE = &h100000
strPath = "C:\Windows\Temp"
Set objfso = CreateObject("Scripting.FileSystemObject")
If objfso.FolderExists(strPath) Then 'Make sure folder exists
Set objFolder = objfso.GetFolder(strPath)
Set colFiles = objFolder.Files 'Enumerate files
If colFiles.Count > 0 Then
For Each objFile In colFiles
Call SetSYNCFlag(objFile) 'Call subroutine for each file found.
Next
Else 'colFiles collection was empty
WScript.Echo "No files in folder", objFolder.Path
End If
Else 'Folder path could not be found
WScript.Echo "The specified folder", strPath, "does not exist"
End If
Sub SetSYNCFlag(objFile)
On Error Resume Next 'Disable automatic error handling
Err.Clear 'Clear the StdErr object before continuing
If wmiAce.AccessMask And SYNCHRONIZE > 0 Then
WScript.Echo "correct attribute already set", objFile
Else
<<<<< Need to set the value of SYNCHRONIZE to 1 >>>>>>
<<<<< HELP >>>>>
End If
End Sub