Mass Edit HTML Files ?? Need To Change over 800 files

Necrosaro420

Senior member
Apr 24, 2005
576
0
0
I need to change over 800 html files on my website to reflect the right year and information at the bottom. Is there a program that will mass edit a list of HTML files and do the exact same thing to them all? It will take me forever by hand. Thanks!
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
If you're on Unix,

(destructive, back up first...)

for $file in `find /var/www/htdocs/yourdir -name '*.html'`; do
cat $file | sed 's/"old_date_string"/"new_date_string"/' > $file
done

sed and find are both available for Windows as well.
 

Modeps

Lifer
Oct 24, 2000
17,254
44
91
sounds like you should have used some sort of server side scripting language... like say, php... that way, you would only have to update one file instead of 800.
 

Necrosaro420

Senior member
Apr 24, 2005
576
0
0
Umm, none of these seems to want ot take out my notes in the HTML? The ones I put in with <!----ADDED THIS FOR----> it will not find that in any of them with all of hte programs mentioned above? Also tried my dreamweaver and textpad???

Any ideas/??? Thanks!
 

WobbleWobble

Diamond Member
Jun 29, 2001
4,867
1
0
In Dreamweaver, make sure you do a find in the "Entire Site" and search the "Source Code", not just text.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Search for: "<!----ADDED THIS FOR---->"
replace with: ""


I don't see the difficulty.