Perform A Find and Replace Across Multiple Files and Directories

BY STANLEY ZAROWIN

 »  Key to Instructions  
To help readers follow the instructions in this article, we used two different typefaces: Boldface type is used to identify the names of icons, agendas and URLs. Sans serif type shows the names of files and the names of commands and instructions that users should type into the computer.

 

PERFORM A FIND AND REPLACE ACROSS MULTIPLE FILES AND DIRECTORIES 
 I frequently use the Find and Replace function (Ctrl+F for Find , Ctrl+H for Replace ) in Word, but it only works with the file I am working on at the time. I can’t, for example, upgrade in one fell swoop someone’s address or other information that may be situated in many different files and even in several different directories. Is there some way to do that?

Unfortunately that very useful function is not built into XP or Vista. (Are you getting the message, Microsoft?) But there are a handful of third-party programs and macros that can perform such a function. You can locate them by googling this search term: find and replace software . Most of the products are available for a fee—many with the option of a free time-limited sample. But a few are shareware, which means they are free for downloading. I’ve tested several. The one that meets my needs because it’s fast and, most important, it’s easy to use, is a freeware macro written by Funduc Software ( www.funduc.com ).

Once you download and install it (just follow the on-screen instructions), all you need to do each time you want to use it is to open the Funduc doc file, which contains the macro. Place the file in some convenient folder, or, better yet, put it on your desktop for near-instant access.

Caveat: You don’t want the macro loaded automatically in every Word file you open or you won’t be able to open Word’s native Find and Replace .

Since your computer is probably set to a security default that warns you when a macro—which can be a dangerous virus—is seeking to load, this Security Warning screen will appear:

Click on Enable Macros and the Funduc macro will then display a screen that resembles your native Windows Find and Replace function but with powerful extra tools (see screenshot below).

As you can see in the screenshot, you can search multiple files and subdirectories and command the macro to match the case of the target words. In this example, I commanded the macro to search for the word Stanley and replace it with Stan in any Word ( doc ) file that contains the word Stanley in the c:ajournaltech q-a directory. If I subsequently place a check in the Search Subdirectories box, the macro will extend the search to all the tech q-a subdirectories.

Doing the same job manually would have taken me hours because I would have had to sift through several hundred files.

 

SPONSORED REPORT

Tax reform complicates year-end tax planning

Get your clients ready for tax season with these year-end tax planning strategies, which address how to make the most of recent tax law changes, such as the new deduction for qualified business income and the cap on the deductibility of state and local taxes.

VIDEO

What RPA is and how it works

Robotic process automation is like an Excel macro that can work on multiple applications, says Danielle Supkis Cheek, CPA. RPA can complete routine, repetitive tasks such as data entry, freeing up employee time from lower-level chores.