Powershell: Trash need more command :)

Created on 4 Apr 2020  路  6Comments  路  Source: PowerShell/PowerShell

sometimes Remove-item is considered a dangerous command. i known it exist -whatif and -confirm switch
but sometimes we need to restore same files or folder deteled by mistake. it great to add some command to complete 'Clear-RecycleBin'

  move files to trash instead tto delete them
RestoreTo-RecycleBin
  restore  files
Get-RecycleBinInfo
  show original absolute path and deletion date
Issue-Enhancement Resolution-Duplicate

Most helpful comment

All 6 comments

For Windows we should bring back file system transactions.

For Windows we should bring back file system transactions.

The only (Powershell) transactions I remember were in the registry provider. I don't ever recall transactions within the file system provider. Are you suggesting adding transactions into the file system provider?

thanks :)

transaction in filesystem its maybe impossible.
another suggestion *-RecycleBin command as wrapper to com object Shell.Application

I found that MSFT does not recommend using Transactional NTFS https://docs.microsoft.com/en-us/windows/win32/fileio/about-transactional-ntfs

Transactional NTFS (TxF) integrates transactions into the NTFS file system, which makes it easier for application developers and administrators to gracefully handle errors and preserve data integrity.

I think so, @TSlivede; @vexx32, can you please mark this as a duplicate?

Was this page helpful?
0 / 5 - 0 ratings