![]() ![]() To get a list of all files with a given extension that contain a given string, you can use the following steps (click on the screenshot to see it full size) I use PowerShell all the time now to make downloading pictures from my camera and organizing them by date easy ![]() Being able to easily store collections of objects in ad-hoc variables (named $something) and then to further be able to pipe the output of anything to anything (using | just like most other shells), you can quickly do some amazing stuff. I’m guessing there actually *is* a way to do this from the GUI, but after spending a couple of minutes either searching all files for the text “.cs” or else searching for files named “connection” I opted to just do it from the command line using PowerShell. In any event, I tried using the default Windows Vista file search dialog, but found that if I wanted to search for “connection” or “database” within all files ending with “.cs” or “.config” I was unable to do so. I often find myself missing UNIX’s grep tool. This week I found myself wanting to search within files of a given extension for a particular substring. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |