PS HarriJaakkonen :~/Blog/Posts> cat ./removing-temporary-attribute-fro.html

Removing the Temporary Attribute from Multiple Files with Powershell

I found this one very helpful in debugging DFS replication with Autodesk generated files.

Autodesk products stamp a temporary mark to files it generates. And this causes DFS to stop replicating them.

Run this powershell oneliner to clear out the attribute from files under directory:



Get-childitem D:Data -recurse | ForEach-Object -process {if (($_.attributes -band 0x100) -eq 0x100) {$_.attributes = ($_.attributes -band 0xFEFF)}}