显示日志中已删除文件的总数

时间:2018-11-27 21:58:38

标签: powershell file logging

我有这个脚本可以删除5分钟之前的所有内容。

Get-ChildItem -Path FOlderPath | where {$_.Lastwritetime -lt (get-date).addminutes(-5)} | remove-item -Force

我希望能够记录带有日期时间戳记的已删除文件的数量。 我不为文件名而烦恼,只是删除的文件总数

0 个答案:

没有答案
相关问题