To use a nice new, more native tool

With this as inspiration
http://myitforum.com/cs2/blogs/yli628/archive/2008/01/28/powershell-script-to-list-files-modified-after-a-certain-date.aspx


PS:> $DateToCompare = (Get-date).AddDays(-2)
PS:> Get-Childitem –recurse | where-object {$_.lastwritetime –gt $DateToCompare}

On Wed, Nov 5, 2008 at 12:04 PM, Kurt Buff <[EMAIL PROTECTED]> wrote:
> That utility is actually called find - I think, Ben, that you've
> renamed it for your own installation. Definitely understandable, since
> the Windows 'find' command is both useless and not for the same
> purpose as the gnu find command.
>
> Still, this is definitely the way I'd go, though if Martin can't
> download that set of tools (I've had problems with it occasionally),
> he can try http://gnuwin32.sourceforge.net - I find they are more
> current, and more available.
>
> Kurt
>
> On Wed, Nov 5, 2008 at 11:21 AM, Ben Scott <[EMAIL PROTECTED]> wrote:
>> On Wed, Nov 5, 2008 at 11:24 AM, Martin Blackstone
>> <[EMAIL PROTECTED]> wrote:
>>> I'm looking for something other than Windows search that will show me files
>>> modified in the last X days.
>>
>>  Try this:
>>
>>        GFIND -daystart -type f -a -mtime -2
>>
>> where "GFIND" is the GNU "find" utility, ported to MS Windows.
>> Available from http://unxutils.sf.net, amongst others.
>>
>> -daystart = compares from 12:00:00 AM, rather than right-this-second
>>
>> -type f = files (no directories)
>>
>> -a = and
>>
>> -mtime -2 = modified time, 2 days ago, or newer
>>
>> -mtime 2 = would give files modified *exactly* two days ago
>>
>> -mtime +2 = would give you files modified older than two days ago
>>
>>  There is also "-mnewer", which will find files newer than a given file.
>>
>> -- Ben
>>
>> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
>> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>>
>
> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to