Advertisement
dcandygmailcom

Use the command prompt to search for a file

Feb 16th, 2019
1,004
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. You can use the command prompt to search.
  2. ----------------------------------------
  3.  
  4. Start - All Programs - Accessories - Right click Command Prompt and choose Run As Administrator. Type (or copy and paste by right clicking in the Command Prompt window and choosing Paste).
  5.  
  6. Search File Names
  7.  
  8. To search for a file in a folder.
  9.  
  10. dir c:\windows\shell32.dll
  11.  
  12. To search for a partial name in a folder
  13.  
  14. dir c:\windows\sh*.dll
  15.  
  16. To search the hard drive for a file and search for hidden files as well.
  17.  
  18. dir c:\shell32.dll /s /a
  19.  
  20. The first search will have to read the disk structure. This places the structure in the file cache. Second and subsequent searches will be run against the cached structure. This means the second and subsequent searchs are very, very quick.
  21.  
  22. For help
  23.  
  24. dir /?
  25.  
  26. Search File Contents
  27.  
  28. To search all ini files in a folder for exact text CodePage
  29.  
  30. findstr /c:"CodePage" c:\windows\*.ini
  31.  
  32. To search all ini files in a folder and it's sub folders for text Windows or System
  33.  
  34. findstr /s "Windows System" c:\windows\*.ini
  35.  
  36. For Help
  37.  
  38. findstr /?
  39.  
  40.  
  41. .
  42. --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement