Windows 2019 Server attrib wasn't removing the system, hidden and read-only attributes as expected.
Make sure you are using an administrative prompt command prompt and then run the command as listed under "# working command
" note the addition of "*.*
"
# failing command
attrib -s -h -r "E:\dont migrate\Roaming Profiles" /s /d
# working command
attrib -s -h -r "E:\dont migrate\Roaming Profiles\*.*" /s /deee
An example of a script to takeownership of a directory tree remove the system, hidden and read-only attributes, give ownership to a specific account and then robocopy
it to a different drive
takeown /f "E:\dont migrate" /r /d y
attrib -s -h -r "E:\dont migrate\*.*" /s /d
icacls "E:\dont migrate" /grant "TOGGEN\toggenadm":F /T /C
robocopy "E:\dont migrate" "Y:\dont migrate" /mir /fft /a-:sh /r:0 /w:0 /log:Y:\dontmigrate.log
0 Comments