简体   繁体   中英

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="../audio/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 ++具有一些不错的搜索和替换功能,您可以在此处使用它们。

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

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

您使用Dreamweaver软件查找用新的音频名称替换所有文件

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM