开发者

Edit multiple HTML Files

I have 90 html files where an audio file is played (wrong link), I need to change the src of the audio file in each one of these files.

from

<embed src="../audio/" autostart=false width=0 height=0 id="sound1" enablejavascript="true">

to:

file 1:

<embed src="../audio/1.mp3" autostart=false width=0 height=0 id="sound1" enablejavascript="true">

file 2:

<embed src="../audi开发者_如何学运维o/2.mp3" autostart=false width=0 height=0 id="sound1" enablejavascript="true">

...

Any suggestions for an automated approach? Thanks

Later edit:

The new src is different for each file... any possibilities to fill this automated for each file? for file1 -> src1, file2 -> src2 ...


Notepad ++ has some good search and replace functions you could use here.


GNU sed is what you need: http://www.gnu.org/software/sed/

Or eventually gawk: http://www.gnu.org/software/gawk/


You use dreamweaver software to find replace all your files with your new audio name

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜