PowerShell
PowerShell로 파일 Trash(휴지통)에 옮기는 방법.
JunkMam
2020. 12. 4. 00:00
해당 방법은 다음 링크에 있는 내용을 보고 테스트한 후 확인한 것이다.
https://stackoverflow.com/questions/502002/how-do-i-move-a-file-to-the-recycle-bin-using-powershell
1 2 3 4 | Add-Type -AssemblyName Microsoft.VisualBasic [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile('d:\foo.txt','OnlyErrorDialogs', 'SendToRecycleBin') | cs |
이렇게 하면,제대로 동작되는걸 확인했다.