문제

Can somebody tell me the best way to delete a series of files between April 1, 2014 and April 17, 2014 on Windows server 2003 command line

도움이 되었습니까?

해결책

This PowerShell oneliner will do the trick. You can remove the back-ticks and put the code all on one line if you want.

Get-ChildItem C:\data\*.* | `
Where-Object {$_.lastwritetime -gt '4/1/14' -AND $_.lastwritetime -lt '4/17/14'} | `
Remove-Item

I found a shorter version of the script here. I prefer to use the full Powershell cmdlet names though.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top