Ran into a virus that changed all the windows attributes on all the files/folders at the root of a network share. Every file and folder had the Read Only, System, and Hidden attribute set.

I tried using “attrib -r -h -s /s /d” but for some reason it didn’t change the SYSTEM on the folders.

Final fix was:


for /f "tokens=*" %i in ('dir /b /a:d') do attrib -r -h -s "%i"

Hope this helps someone else.