wood burning stoves 2.0*
The moose likes General Computing and the fly likes Tool to Change Text on multiple files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Tool to Change Text on multiple files" Watch "Tool to Change Text on multiple files" New topic
Author

Tool to Change Text on multiple files

Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
Hi,

Let's say, instead of changing text in just 1 file, say, change all 'aaa' to 'bbb' in file ccc.txt, I want to change all 'aaa' to 'bbb', in all files in all subfolders in folder 'ddd'.

Do you know of such useful tool?

(I apparently didnt include the non-java codes during refactoring by eclipse, so I am now faced with this headache.)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41025
    
  43
If you want to do this programmatically in Java, check out TextTools and AwkTools.

Otherwise, I'd use sed or awk from the command line (available in CygWin and UnxUtils on Windows)


Ping & DNS - my free Android networking tools app
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
Thanks for the reply. I am currently trying out windows-based 'Neo Replace'. It seems useful so far.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Tool to Change Text on multiple files
 
Similar Threads
Ned help with "XPath"
Arrays of strings from a Vector
copy recursivley specific file
Request url forwarding
Using class with 'main' method