2016-12-01

Replacing a text string across a directory

Since I have been working with my company, I have learned about LOADS of great tools.
For example, Beyond Compare, when keeping files synced across multiple environments (like development and production).

Another great one is FileLocator Lite, because, you can't put a price on finding exactly the data you need as quickly as possible.

Today, I am just pleased as punch with Notepad++. In my tasks modifying ARCHIBUS, I work in this program almost constantly, and have been doing so for the past three years. Obviously, I was already a pretty big fan (see my previously published article "Notepad++ Formatting Tip"), but, today, my unnatural love for this program grew even greater.

I needed to change the value for a single attribute, but, across every place where it showed up in the system, in all three environments we're using.

Turns out that Notepad++ has a lovely entry in the Search menu called "Find in Files..."
I was able to locate the exact string I needed, dictate the replacement string, filter for only the files our team had modified, in only the applicable directories.


If there is any doubt about context, you can see in the search results the exact line where the search string is located.

I recently returned from yet another inspiring Autodesk University for #AU2016. If you're interested in catching up with the @MistresDorkness commentary, twitter is the place to go.