Welcome to Bucaro TecHelp!

Bucaro TecHelp
HTTPS Encryption not required because no account numbers or
personal information is ever requested or accepted by this site

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Search for Text in Text Files

Getting Windows Folder Search function to reliably find text within a file is a real trick. There are several places within windows where you can configure search, but it never seems to do a reliable job. The solution is to use the simple batch file shown below:

findstr /s /i /m "string" *.*
pause

Today, most people use Windows Operating System through it's graphical user interface (GUI) and perform tasks using check boxes and drop-down lists. However, the first PCs didn't have a GUI, they used the Disk Operating System (DOS). DOS has a text interface where the user performs tasks by typing text commands. The interface is referred to as the command line. The DOS command line is still available in Windows today.

The best way to use DOS is to type commands into a file called a batch file. To create a batch file just create a text file with Windows Notepad, type in your DOS commands, then save the file with a convenient name and the file extension .bat . To execute a batch file just double click on the file's name in Windows Explorer.

The batch file shown above uses two lines. The first line uses the findstr command with the switches /s /i and /m followed by the text string you are searching for (in quotes) followed by the wildcards *.* which means search in all files.

/s means searches in the current directory and all subdirectories.
/i specifies that the search is not to be case-sensitive.
/m prints only the file name if a file contains a match.

The second line in the batch file is the pause command. This causes the DOS window to display its results until the user presses any key. Without the pause command the DOS window would immediately close.

Find more information about DOS commands at the TechNet Library Command-line reference A-Z

More Windows Administration Information:
• How to Configure the msdos.sys file
• Computer Data Backups - Test Now or Cry Later
• Installing a Local Printer on Windows Vista
• Guide To Setting Up Dual Monitors
• Retrieving Information from Computers Belonging to an Active Directory OU
• Disable Programs That Run at Startup on Windows 10
• Windows Server 2003 Active Directory and Network Infrastructure
• A Handful of Useful Run Commands: calc, notepad, wordpad, voice recorder, control
• Network Security Through the Principle of Least Privilege
• Configure Windows Indexing Service for Performance

Save Money with Refurbished, Pre-Owned, and Open-Box Products on Amazon Renewed

For example this refurbished Lenovo Thinkpad T440 Ultrabook, 14 Inch Display, Intel Core 4th Gen i5-4300U 1.9GHz, 8GB RAM, 500GB, USB 3.0, WiFi, with Windows 10 Professional was only $227.55 with FREE Shipping.

This Amazon Renewed product was professionally inspected and tested by an Amazon qualified supplier. Box and accessories may be generic. Product works and looks like new. Comes with a 90-day warranty.

Click here to what kind of amazing deal you can get with Amazon Renewed.

RSS Feed RSS Feed


Follow Stephen Bucaro Follow @Stephen Bucaro

Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2019 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268