johnmahugu

windows xp searcher

Jun 3rd, 2015
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1.  
  2.  
  3. On Windows XP, I have set an AT job to run this command daily in C:\
  4.  
  5. dir /s /b * > dirlist.txt
  6.  
  7. This lists the full path of all files on the C drive. Then whenever I need to find a file, I can use findstr. This beats using Windows Explorer Search since it allows regular expression matching on the entire path. For example:
  8.  
  9. findstr ".jpg" dirlist.txt
  10. findstr /i /r "windows.*system32.*png$" dirlist.txt
  11.  
  12. This is a very fast solution to set up, and great if you find yourself with a fresh Windows install and no internet connection.
  13.  
  14. If you need to search within certain file types for some pattern, first list all of the files you need to check, then search within them. For example, to find a Java or Python program that flips an image you could do this:
  15.  
  16. findstr "\.java \.py" dirlist.txt > narrowlist.txt
  17. findstr /i /r /f:narrowlist.txt "flip.*image"
Advertisement
Add Comment
Please, Sign In to add comment