UnBlock Files in a Directory
Posted: 03 May 2022, 05:04
After downloading all the files from OneDrive MS_OneDrive_Bustup had recycled from Desktop, after the backup on Desktop folders was stopped by me, all of the recovered files had a blocked flag on them. (The correct pathnames showed up for the files in the recycle bin, but the restore action wiped them)
This little one-liner ran silently, and, after performing the trick. opened up a PS window in the script directory.
For paranoia, go this way to get a list of all files modified- other ways posted here are welcome.
This little one-liner ran silently, and, after performing the trick. opened up a PS window in the script directory.
For paranoia, go this way to get a list of all files modified- other ways posted here are welcome.
Code: Select all
SetWorkingDir %A_ScriptDir%
psScript =
(
dir -Path "Your_FQ_Folder_PathName" -Recurse | Unblock-File
)
;RunWait PowerShell.exe -Command &{%psScript%} ,, hide
Run PowerShell.exe -NoExit -Command &{%psScript%}