Remove Read Only Item Flag
I recently had an issue where I needed to update the Read Only Item Property on a large set of files.
Below is a script that will process all files under 'C:\BACKUPFILES' and set the Item Property 'Read Only' to false on all files.
I recently had an issue where I needed to update the Read Only Item Property on a large set of files.
Below is a script that will process all files under 'C:\BACKUPFILES' and set the Item Property 'Read Only' to false on all files.
$FolderPath = 'C:\BACKUPFILES' $setRoAttributeTo = $false $Items = Get-ChildItem -Path $folderPath -Recurse Foreach ($File in $Items) { IF ($file.Attributes -like '*ReadOnly*'){ Write-Host $file.FullName Write-Host "File Read Only" -BackgroundColor DarkRed Set-ItemProperty $File.FullName -Name IsReadOnly -Value $setRoAttributeTo } }