To search in all files loaded on the page for a specific string, hit Ctrl + Shift + F (Cmd + Opt + F). This method of searching supports Regular expressions as well. A file name conflict that both Windows and Mac OS have in common can be resolved with this tip. If you are saving a file to your destination and a file already is there with the same name, you could cancel the operation or replace it.
Say you’re searching for a file, and you know it was last modified during a certain period of time. You can limit your searches to date ranges in Windows, but it’s not immediately obvious.
Searching a specific date range in Windows 8 and 10 is harder than it needs to be. Back in the days of Windows XP, File Explorer presented a calendar selector front and center. Even in Windows Vista and Windows 7, that selector wasn’t hard to get to. In Windows 10, you have to jump through a hoop or two first.
How to Search a Date Range with the Keyboard
First of all, if you like using the keyboard, you can easily select a date range by typing it in the search box in any folder, just like in previous versions of Windows. Just use the following syntax:
The key is the two periods between the dates, which tells the search engine to use it as a range. You could also use “Datecreated:” or just “date:” instead of “modified:” if you wanted to.
RELATED:Use Advanced Query Syntax to Find Everything
And if you’re a real keyboard junkie, know that Windows uses the Advanced Query Syntax for search commands. This means you can search using Boolean operators, file properties, kinds of files, and a lot more. In fact, when you select options using the File Explorer UI, Windows is really just inputting those text searches for you.
How to Select a Date Range with the Mouse
Speaking of the File Explorer UI, it is still possible to search for a range of dates using just your mouse. This is where those hoops come in. In the File Explorer ribbon, switch to the Search tab and click the Date Modified button. You’ll see a list of predefined options like Today, Last Week, Last Month, and so on. Pick any of them. The text search box changes to reflect your choice and Windows performs the search.
To choose a more specific date range follow those steps, then click anywhere on the text in that box after the colon (so, for example, on “this week”) and a calendar will pop up. Click any date to search for files modified on that day.
To search a range of dates, you have a few options:
![What is a great tool to know when searching for a specific file on a mac What is a great tool to know when searching for a specific file on a mac](/uploads/1/2/6/8/126879412/715553117.jpg)
- Click a date and drag your mouse to select the range. This is the easiest option if your range falls within a month.
- Click one date and then Shift-click another date. This makes it easier to select a range that spans multiple months.
- Click the name of the month at the top of the calendar to select the whole month. When you do that, the calendar zooms out to show you the whole year. You can select the whole year as a range and the view will keep zooming out until you can select an entire decade.
Don’t forget, once you’ve selected your date range, you can also add other parameters like file name or file type to your search. And if you think it’s a search you’re likely to perform again, go ahead and save it by clicking the Save Search button. Next time, your search will be just one click away.
READ NEXT- › What Can I Do with My Old iPhone?
- › How to Stream UFC 242 Khabib vs. Poirier Live Online
- › Free Download: Microsoft’s PowerToys for Windows 10
- › How to Overclock Your Computer’s RAM
- › What’s New in Chrome 77, Arriving September 10
Find is another great command line tool that every Windows user should know about because it can be used to search content of files for specific strings of text.
Find’s Switches and Parameters
As with every command prompt based tool in Windows, there are certain switches and parameters you will need to know in order to use the tools effectively. These are listed and explained below.
- /v – This switch will show any lines that don’t contain the string of words you specified.
- /c – This switch tells the find tool to count how many lines contain your search terms.
- /n – This switch shows the numbers that correspond with the lines.
- /i – This switch tells find to ignore the case of text you are searching for.
In addition to these switches, there are two parameters which you can specify with this tool.
- “String” – The string will be the words you are searching for in your documents. You must always remember to keep this secrtion surrounded by quotation marks, otherwise your command will return an error.
- Pathname – This parameter is where you will specify the location that you want to search. This can be as broad as listing a drive or as specific as defining a single or multiple files. If you don’t specify a path, FIND will ask you for text input or may accept text piped from another command. When you are ready to end the manual text input, you can press “Ctrl + Z.” We will discuss this more later.
Find’s Syntax
Like every tool in windows, you will need to know how to enter your commands. The syntax below is the perfect model.
Depending on your command, you will receive one of three %errorlevel% responses.
- 0 – The string you were searching for was found.
- 1 – The string you were searching for was not found.
- 2 – This means you had a bad switch or your parameters were incorrect.
Let’s Practice
Before we get started, you should download our three sample text documents which we will use for the test.
These documents each contain a paragraph of text with a few similar word groupings. Once you have downloaded these three documents, you can copy them into any folder on your computer. For the purposes of this tutorial, we will put all three text documents on the desktop.
Now you will need to open up an elevated command prompt window. Open the start menu in Windows 7 and 10 or open the search function in Windows 8 and search for CMD. Next, right-click on it and then press “Run as administrator.” While you don’t need to open an elevated command prompt window, it will help you to avoid any pesky confirmation dialog boxes.
Our tutorial today will cover several simple scenarios which will be elaborated on below.
- Search a single document for a string of words.
- Search multiple documents for the same string of words.
- Count the number of lines in a file or multiple files.
Scenario 1 – Search a single document for a string of words.
Now that you have your three documents downloaded, we will enter a command to search the text file called “exercise” for the words “martin hendrikx.” Use the command shown below. Remember to put your search string in quotation marks and change the path to match the folder where your documents are saved.
You will notice that no results showed up. Don’t worry, you did nothing wrong. The reason you have no results is because FIND is looking for an exact match to your search string. Let’s try it again, but this time, let’s add the “/i” switch so that FIND ignores the case of your search string.
Now you can see that FIND brought up one line that matches the search string, which means it is working. Let’s try this again, but change the search string to “sushi”; if your results look like the image below, you did it right.
Scenario 2 – Search multiple documents for the same string of words.
Now that you know how to do a basic search, let’s try to widen the span of the search. We will now search two of the text files (exercise and sample) for the term “sushi.” Do this by entering the following string. Remember to change the path to match the location of your files and add the “/i” switch so that your search is not case-sensitive.
You will notice that the search terms were found in both documents and the sentences in which they were found, are listed under their corresponding file names and locations. Try this again, but this time, add the third file to the FIND command and search for the word “potato” instead. Your search results should look like the image below.
Note that the text found in each document is actually “potatoes” which means that even if you type a part of a word, you will see any phrases that contain the search string. Alternatively, you could use this command to check all text files.
Scenario 3 – Count the number of lines in a file.
If you want to know how many lines there are in a file, you can use the search command below. Remember to add a space between all your switches. In this case, we will replace the pathname with that of the “sample.txt” file. If you want only a number as your result, use this command:
If you want the number and the file info, use this command:
If you want to count the lines in multiple files on the desktop, use the following command.
You can now experiment with a few different commands and familiarize yourself with the tool. It can help to save a lot of time in the future once you have a system created. Have fun and keep on geeking.
Image Credit: Littlehaulic on Flickr.com
![Great Great](/uploads/1/2/6/8/126879412/803207591.jpg)
What Is A Great Tool To Know When Searching For A Specific File On A Mac
READ NEXT- › What Can I Do with My Old iPhone?
- › How to Stream UFC 242 Khabib vs. Poirier Live Online
- › Free Download: Microsoft’s PowerToys for Windows 10
- › How to Overclock Your Computer’s RAM
- › What’s New in Chrome 77, Arriving September 10