I have a Powershell script that copies files from one location to another. Once the copy is complete I want to clear the Archive attribute on the files in the source location t
$attr = [System.IO.FileAttributes]$attrString
$prop = Get-ItemProperty -Path $pathString
# SetAttr
$prop.Attributes = $prop.Attributes -bor $attr
# ToggleAttr
$prop.Attributes = $prop.Attributes -bxor $attr
# HasAttr
$hasAttr = ($prop.Attributes -band $attr) -eq $attr
# ClearAttr
if ($hasAttr) { $prop.Attributes -bxor $attr }