I have a bunch of files that have a particular numeric text string (an 8 digit number, essentially) in them that I need to change to a different text string (basically a different number). This is on a virtual machine running Windows XP. It has Visual Studio 6 installed and some custom development tools, and not much else.
Normally, I would just go into each file in Visual Studio 6 (they are x86 assembly source files) and I would just do a replace on the text string. That’s fine if you’re only doing a few files, which is what I normally do.
The issue here is that I have about a hundred or so files to do.
Is there any quick way of substituting text on multiple files that will work on this computer?
The files are scattered about in half a dozen sub-folders one or two levels deep under one main folder.
I have complete control of the machine, though I would prefer not to install any additional software to do this if possible.
Damn, beat me to it. The find/replace in multiple files, and ability to select text in “column mode”, are two features of Notepad++ that have made my life so much easier.
I’ve installed cygwin on every Windows work computer I’ve had, but lately notepad++ is taking its place for a lot of uses. There’s always emacs for Windows, too.
There is a “find in files” but there’s no replace option that works in files (at least not that I see).
Newer versions of visual studio may have it, but upgrading VS for this project isn’t practical (we’ve estimated it to be about 6 man-months worth of work).
May be a version thing or I may be remembering wrongly. The last time I was living this stuff daily was in, gosh, 2012 using then-new VS 2012. Wow time flies!
Thinking more now I vaguely recall it was a two-step process. Somethign like this:
You could use “find in files” to locate each file in a folder tree that matched your string or regex. An option would open each matching file in the IDE. Then once you had umpteen tabs open, within the ordinary find and replace dialog box there was an option to apply the action to all tabs or just the current tab. Then depending on how much faith you had in the uniqueness of your string [Replace All] did every match in every file. Then [Close all tabs] and you’re done.