File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Head First Android this week in the Android 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: 2066
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
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
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)
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2066
Thanks for the reply. I am currently trying out windows-based 'Neo Replace'. It seems useful so far.
 
 
subject: Tool to Change Text on multiple files
 
jQuery in Action, 3rd edition