bdukes / PowerShellModules

A collection of PowerShell modules
Apache License 2.0
44 stars 9 forks source link

Remove-ItemSafely halts and asks if you want to permanently delete a file if you're holding shift #22

Open Macil opened 2 years ago

Macil commented 2 years ago

I ran a powershell command in a terminal that looped over many files, processing each to create a new file and then deleting the original file with Remove-ItemSafely. I minimized the terminal and did other things while the command ran. I noticed multiple times that if I happened to be holding shift while the Remove-ItemSafely call happened, the command would halt there and Windows would pop open a modal asking if I wanted to instead permanently delete the file. This would either interrupt my typing, or sometimes the modal would appear in the background and I wouldn't notice it until later, leaving my script halted until I addressed the modal.