| This 66 message thread spans 3 pages: < < 66 ( 1 2  ) || |
|How to edit a bunch of static HTML files at once?|
| 1:21 am on Oct 20, 2008 (gmt 0)|
I have an older site that is just about 100 static html pages. Instead of hand editing 100 files, what I'd like to do is make the same edits to all of them, all at once.
I use Notepad++, which kind of does this with the "Find" and "Replace All" functions, but this only works with a small number of characters. I want to basically replace a block of code with another block of code... or just add a block of code to a specific spot without replacing anything.
Does anyone know if there is any way to do this or any program that will give me this capability?
Thanks in advance for any help.
| 2:36 am on Apr 4, 2009 (gmt 0)|
I've used this for quick and dirty editing. You need access to perl on your host.
find /directory_of_website/ -type f ¦ xargs perl -pi -e 's/old_value/new_value/g'
This will work on any file in the directory
| 3:16 am on Apr 16, 2009 (gmt 0)|
Dreamweaver is my find and replace of choice.
| 4:14 am on Apr 16, 2009 (gmt 0)|
Another vote here for Eclipse. Absolutely awesome development platform.
Only gripe is the lack of word wrap :(
| 2:18 am on May 26, 2009 (gmt 0)|
System: The following message was spliced on to this thread from: http://www.webmasterworld.com/html_editors/3920019.htm [webmasterworld.com] by caine - 7:19 am on May 26, 2009 (GMT 0)
|I want to basically replace a block of code with another block of code... or just add a block of code to a specific spot without replacing anything |
In another thread on How to edit a bunch of static HTML files at once [webmasterworld.com], members voted for several options.
Thread expended... Here you may see it compiled.
SSI HTML kit
Search and replace 98
Replace Text, formerly called BK ReplaceEm
Multiple File Search & Replace
Eclipse for PHP
Alias Search & Replace
Alias Find and Replace
Advanced Find and Replace from Abacre
Actual Search & Replace
Visual Studio has a good "find in files" and "replace in files"
"ReNamer" .. freeware. It can make all sorts of changes .. all the files in a folder. Will change extensions, '-', '_', words, case sensitive .. lots of choices. Append and prepend, all instances, first intance, etc.
|grelmar: It's for stuff like this that I still keep a copy of Homesite installed |
(first it was Allaire Homesite, then Macromedia Homesite, then Adobe bough Macromedia, and it vanished). Outdated, deprecated, bought out by progressively fatter software companies until it got relegated into not-quite-abandonware (ie: you can't buy it, but lord help you if you in any way violate the copyright). So don't go searching in the darker parts of the net for it, because that would be wrong...
And still, hands down, the best HTML code editing software ever.
| 7:26 am on May 26, 2009 (gmt 0)|
Nice write up JohnRoy, i will be sure to refer to your post in the future.
| 10:29 am on May 26, 2009 (gmt 0)|
To be honest server side/php includes were designed to solve this specific problem, a common area of code used in many pages, maintained in one file. If you have this capability on your webserver you don't need global editing scripts.
| This 66 message thread spans 3 pages: < < 66 ( 1 2  ) |