The stupid, stupid Windows search (Start Menu > Search) doesn’t work on one of my computers (running WinXP Pro). Yes, I made sure to add the network location that holds my files, and yes, I rebuilt the file index. The damn thing still ignores everything and claims I don’t have any files, anywhere.
Powershell to the rescue!
Yes, this is a very, VERY simple application of PowerShell, but today it came in insanely useful, and hey….I’m still a POSH n00b, okay? #Defensive
Here’s what I did:
- Start > Run > “PowerShell”
- cd “\\myUNC\users\jen\My Documents”
- Get-help dir
(…to get help on the command, because I forgot what parameters I needed. “dir” is an alias for “Get-ChildItem”, the true POSH cmdlet.)
- Get-ChildItem -Filter *restore*.sql –Recurse (this searches the directory and all subdirectories for all .SQL files with “restore” in the name).
Oh, THERE’S that stupid file….
Happy days,
Jen McCown
http://www.MidnightDBA.com/Jen
Learn more about PowerShell from my husband Sean on his blog, DBARant , and also through his POSH tutorials on MidnightDBA.com.