Feed on
Posts
Comments

Category Archive for 'Powershell'

There is a way to use Powershell to search the contents of a file.  This method will not use the Windows index so it will be slow, but it does work. get-childitem c:\users\ -filter *.txt -recurse | select-string -list -pattern "yourtext" | foreach {$_.Path} Finding files get-childitem: Get the children for a container.  In this [...]

Read Full Post »

I needed to find a file that was created in March 2009.  The folder isn’t indexed so I created this PowerShell script to help find the files within a specified date range.   childitem -filter *.doc? -recurse | where {$_.CreationTime -gt [datetime]::parse("03/01/2009") -and $_.CreationTime -lt [datetime]::parse("03/31/2009") -and $_.length -gt 50}   The first line recursively [...]

Read Full Post »