Is there a tool that can search and replace multiple files under all subdirectories recursively?

  • Thread starter Thread starter kfman
  • Start date Start date
K

kfman

Is there a tool that can search and replace multiple files under all
subdirectories recursively?

Hi all,

In my project, I often need to change the variable names in my programs, and
then remember to undo the changes.

Let's say, in a forward direction, I need to:

change "aaa" to "bbb",
change "ccc" to "ddd",
change "eee" to "fff",
....

in all files under specified directory and its sub-directories, recursively.

And in another day,

I will have to undo the above changes, i.e.

change "bbb" to "aaa",
change "ddd" to "ccc",
change "fff" to "eee",

....

in all files under specified directory and its sub-directories, recursively.

Is there a tool/software that can do these automatically for me?

I hope the tool can automate the process based on a symbol-replacement list
that I provide.

Thanks a lot!

(I am working on Windows XP. )
 
kfman said:
Is there a tool that can search and replace multiple files under all
subdirectories recursively?

Hi all,

In my project, I often need to change the variable names in my programs,
and then remember to undo the changes.

Let's say, in a forward direction, I need to:

change "aaa" to "bbb",
change "ccc" to "ddd",
change "eee" to "fff",
...

in all files under specified directory and its sub-directories,
recursively.

And in another day,

I will have to undo the above changes, i.e.

change "bbb" to "aaa",
change "ddd" to "ccc",
change "fff" to "eee",

...

in all files under specified directory and its sub-directories,
recursively.

Is there a tool/software that can do these automatically for me?

I hope the tool can automate the process based on a symbol-replacement
list that I provide.

Thanks a lot!

(I am working on Windows XP. )

Create two batch files like so:

forward.bat
========
ren bbb aaa
ren sub1\bbb aaa
ren sub2\bbb aaa

backward.bat
==========
ren aaa bbb
ren sub1\aaa bbb
ren sub2\aaa bbb

Note that the whole scheme will fail if you create new
files called "bbb" in between running forward.bat and
backward.bat.
 
Pegasus said:
Create two batch files like so:

forward.bat
========
ren bbb aaa
ren sub1\bbb aaa
ren sub2\bbb aaa

backward.bat
==========
ren aaa bbb
ren sub1\aaa bbb
ren sub2\aaa bbb

Note that the whole scheme will fail if you create new
files called "bbb" in between running forward.bat and
backward.bat.

Not the file NAMES, text WITHIN multiple files across multiple folders.

Google search on "search replace text multiple files free" yielded thousands
of hits. Here's one with six solutions:

http://www.freedownloadscenter.com/Utilities/Text_Search_and_Replace_Tools/index6.html
 
Back
Top