Code: Select all
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "explorer.exe shell:RecycleBinFolder", 9
WScript.Sleep 1111
WshShell.SendKeys "^z"
WshShell.SendKeys "%{F4}"
#1] Aside from un-deleting last item[s] that was [or were] deleted, it also executes an un-move command- i.e. when the last action was not a deletion but movement. How can this be avoided? How to only restore items from Recycle Bin
#2] How to make this run in the background? If I change this to
Code: Select all
WshShell.Run "explorer.exe shell:RecycleBinFolder", 7
I am using Windows 10 Enterprise 20H2 19042.746 x64