回答編集履歴
1
コマンド修正
answer
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
PowerShellでもよければ以下で。
|
2
2
|
```PowerShell
|
3
|
-
$Dt=Get-Date -Format "yyyy/MM/dd";Get-ChildItem c:\temp | Where{$_.Name -Match "^aa[0-9]+$"} | Where{$_.LastWriteTime -lt $Dt.AddDays(-2)} | Remove-Item
|
3
|
+
[DateTime]$Dt=Get-Date -Format "yyyy/MM/dd";Get-ChildItem c:\temp | Where{$_.Name -Match "^aa[0-9]+$"} | Where{$_.LastWriteTime -lt $Dt.AddDays(-2)} | Remove-Item
|
4
4
|
```
|