miCRoSCoPiC^eaRthLinG
Mar 26 2007, 05:36 AM
| | The title says it all - am hunting for a freeware tool that'd allow me to search a BLOCK of text (as opposed to a line of text in most editors) across multiple files and replace it in all those files. Has anyone come across such a tool. I Googled and found a few paid ones and even gave a try to their trial versions - but all of them seemed buggy and ill-designed.
It'll be really great if someone can suggest such a tool.
Regards, m^e |
Comment/Reply (w/o sign-up)
pyost
Mar 26 2007, 09:47 AM
I haven't heard of such a program, but you could make it yourself. That way you would get exactly what you want and how you want it. I've even got an idea how to do it: - Three text boxes: files, search and replace
- In each line of the first one would be a file you want to edit, the second one would contain what to search for, and the third what to replace it with
- When clicked on "Start", the program would load each line of the second and the third box in a array.
- After that, the program would load the file contents in an array (again, one element for each line)
- The program would then search the file array to see if any sequence of members matches the one in the search array - if it does, it would be replaced with the sequence in the replace array
- Finally, the file would be opened for writing and cleared, and then you'd write the new file array into it
- Repeat the process for all files
Might not be so fast, but will definitely do what you need.
Comment/Reply (w/o sign-up)
turbopowerdmaxsteel
Mar 26 2007, 10:25 AM
I was on the job myself. It would be called Mr. Block Text  . Progress so far:- > Add/Edit/Remove files to the list > Search Forward + Backward in multiple files > Replace / Replace All > Backup Files before Replace
Comment/Reply (w/o sign-up)
miCRoSCoPiC^eaRthLinG
Mar 26 2007, 11:53 AM
Pyost,  I had the same thoughts too.. but who wants to go into the pain of writing one right now... lets see how turbo's software comes out..
Comment/Reply (w/o sign-up)
turbopowerdmaxsteel
Mar 26 2007, 12:04 PM
Ok here goes the Work in Progress version. http://ntek.astahost.com/wip/mrblocktext/Hopefully, this would serve your purpose. Do mention the features you would like to be added/ripped off and any bugs that you encounter (I had to rush things 'cause of the classes). For now, the backups will be stored in the backup directory of the application with a timestamp prefix added to the filename.
Comment/Reply (w/o sign-up)
miCRoSCoPiC^eaRthLinG
Mar 26 2007, 12:24 PM
Check it out and here are the problems: Problems- It finds and replaces ONLY the FIRST INSTANCE of a string in a file. The S & R function halts after that.
- After replacing a string, it pops-up a message-box saying "Replaced (x) Instances". That is fine - but it keeps reporting that it replaced an instance EVEN AFTER the replacing is over. What I mean is that supposing you've searched & replaced a particular string and there are no more instances of the same string in the file. If you the try S & R again, it still reports that 1 instance has been replaced
 - Back-up doesn't work yet
- The S & R function works on executables (.exes) too and dutifully screws them up even if there's NO POSSIBILITY of such a string occurring inside a .exe.
Suggestions:- Include an option to add folders instead of single files.
- Include an option to recurse into subfolders and perform the S & R
- Add a file filter along with the above two - so you can specify say, *.txt or *.htm and it'll look for the string in only those file types.
Comment/Reply (w/o sign-up)
ethergeek
Mar 26 2007, 03:09 PM
If you don't need a gui program, awk will do this for you. The syntax can be a little confusing, but if you read the manpage you should have no problem devising an awk statement that will do anything you like. Also, a perl script could do this extremely easily in less than 20 lines of code. I forgot to mention, awk is both freeware AND open source.
Comment/Reply (w/o sign-up)
miCRoSCoPiC^eaRthLinG
Mar 26 2007, 04:06 PM
ethergeek: If it was for myself - I'd probably use awk. Would have been a much faster and smoother approach. But this is for someone else, who sadly has no clue how to work out of the Windows box. So there...
Comment/Reply (w/o sign-up)
vujsa
Mar 26 2007, 04:40 PM
Well, I use CuteHTML for most of my editing needs and it includes a text replacement feature that I use a lot. It will search and replace text on the active document or all open documents. It isn't very fancy and doen't use any regular expressions but with a little practice, you'll figure out how to overcome that. It will do large blocks of text as well. The demo version stops providing code tips and more advanced features but the find and replace feature works great. I use an older version - CuteHTML LE from 2001  You might give it a try, I'll look around and see if I still have the installer for it if you need. vujsa
Comment/Reply (w/o sign-up)
ethergeek
Mar 26 2007, 05:02 PM
QUOTE(miCRoSCoPiC^eaRthLinG @ Mar 26 2007, 09:06 AM)  ethergeek: If it was for myself - I'd probably use awk. Would have been a much faster and smoother approach. But this is for someone else, who sadly has no clue how to work out of the Windows box. So there...  Roger that...though you still might be able to incorporate awk as the replacement backend for the text search/replace instead of writing your own regexes and routines. You can abstract the operation but still maintain the power of awk
Comment/Reply (w/o sign-up)
turbopowerdmaxsteel
Mar 27 2007, 04:17 PM
The new tool, Search & Replace is ready. Incorporated most of the features and hopefully bugs would be minimal. You can get it from http://www.ntek.astahost.com/wip/searchandreplace/
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : block, text, search, and, replace, tools, multiple, files,
- Free Plugins For Dreamweaver
Tools: Skype, Google, Adobe kuler, Paypal, CSS and dreamweaver recipes (4)
Magiciso
Open .iso files without CD/DVD (0) With MagicIso you can simple open files like .iso, .bin, .uif and many other formats without you
need to burn files on CD/DVD first. You can open up to 700MB files. You can off course burn .iso
.bin .uif and many formats to CD/DVD with MagicIso, but one thing make MagicIso better then other
softwares, and it is with MagicIso you can burn a file with up to 10GB size. It's not all
function, you can convert between .iso .bin .uif and many other formats. MagicIso is a useful
software, it's not free, but you can try it as long as you want, so it is not time limit....
Indexmaker 1.01
Make an index from your files and folders (5) With Indexmaker you can create an index file in html format directly from your files and folders.
You can crreate from any folder of your hard disk with all its subfolders or not a finish HTML file
with hyperlinks of your files. This freeware comes with two HTML layouts with the posibility to show
or not the size and the date and time of your files. It is more simple and less advanced than
DIR2HTML -which i prefers- because your resulting index file don't create any index of your
subfolders if you choose the option to view them, but comes very handy if you want to c....
Ip Tools 2.50
19 TCP/IP utilities in one program (1) QUOTE IP-Tools offers many TCP/IP utilities in one program. This award-winning program can work
under Windows 95/98/ME / NT4.0/2000/XP and is indispensable for anyone who uses the Internet or
Intranet (if you are a network administrator, you should try our powerful network monitor: Advanced
Host Monitor and program for wireless messaging from our partners: NotePage). IP-Tools includes 19
utilities: Details Local Info - examines the local host and shows info about processor, memory,
Winsock data, etc Details Connection Monitor - displays information about current....
Restoration
Restore files you've deleted! (8) QUOTE "When you put an item into the trash you don't actually delete the file all you do is
tell the operating system that it can reuse that space. With restoration you unease files because
you are looking for the data on the drive that is still intact. You can use this program to recover
documents and even data that you thought was long gone." - G4 This program has been
recommended by the guy's at G4's Call For Help, it's a very good program, I've tried
it myself. Previously for my undelete needs I was using Tune Up Utilities, but that pro....
Pov Tools
Persistance Of Vision / Ray Tracing (0) I'm looking for tools that work with the POV engine. I use POV for all kinds of stuff, and I
can create some great 3D pictures. But sometimes I find it takes a long time to get a scene to look
just right. I know there must be some good tools out there for POV, but I haven't found any.
Am I just looking in all the wrong places, or what? I would love it if I could use something like
wireframe to be able to edit the objects easier when I'm trying to place them, or maybe
something to let me move objects' skeleton's for 3D animation. Right now, I do ....
Php Designer 2005
Highly-rated freeware text editor (1) PHP Designer 2005 is a text editor/environment that I discovered in my search for a php editor that
had a built-in browser and debugging abilities as well. PHP Designer 2005 is not just any text
editor though. With this program, you can use many scripting/markup/programming languages such as
HTML, CSS, Javascript, Java, PHP, Perl/CGI, SQL VB, C# and more. Other features include: - Built-in
browser to view your pages - Built-in debugger to check for errors - Common HTML tags and syntax -
Common PHP syntax - various environment skins And many more features... PHP De....
Pdf Creator: Create Pdf Files For Free
Print any file to pdf (w/out printer !) (5) After a post about PDF Reader and Acrobat... I found a usefull ressource (sourceforge.net : have
a look on this site if you want to know how to find good freewares, and perhaps participate to great
GNU/GPL projects...) to create PDF files : PDF CREATOR It should be use like a "virtual printel"
in fact, and so that's really usefull, because you don't have to run a speciphic
application, be sorry if this application doesn't support the type of document you want to
create in PDF mode, and so on. You just have to select print in the application you work, a....
Context Programmer's Editor
Text editor (HTML and programming too). (2) This is a freeware text editor. It can be used to write different programs in different programming
languages, including HTML. It is downloadable from this site and here you can also donate to the
write of Context if you wish. The author also wishes that you give suggestions and feedback.
/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />....
Any Tools For Video Tutorial Creation (for Linux)?
software and/or tutorial... (4) Hi... Was a bit confused about where post it... (There/Linux/Graphics-Multimedia Software...) -
hope that I choosed right... if not I don't mind moving it around a bit /tongue.gif"
style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> I'm looking for a way
to create a video tutorials (or other words - capture the screen to video...) - I know that this is
simplest that I can think - but I want to find a good and checked way. I know that there is a Video
Tutorial about creating a video tutorial (for windows) in Blender 3d resorces, but this is ....
Iconart
create .cur .ico and .ani files (3) Recently, I've been working on overhauling a long time project of mine (well, and a few friends.
But its mine because I've done all the work). Of course, I wanted to make it all spiffy and
memorable to people with ultra short attention spans who need new stuff every few seconds to hold
their memory. The first step would be to make our site stand out in the favourites, have a
favicon.ico. The other thing I wanted was a custom cursor. So I went questing for a program that
would allow me to do such things, and at the well known HTML site LissaExplains I found IconA....
Looking for block, text, search, and, replace, tools, multiple, files,
|
See Also,
*SIMILAR VIDEOS*
Searching Video's for block, text, search, and, replace, tools, multiple, files,
|
advertisement
|
|