# How do I make a .wav file play when I open a file.

**URL:** <https://boards.straightdope.com/t/how-do-i-make-a-wav-file-play-when-i-open-a-file/67465>\
**Category:** Factual Questions\
**Created:** [June 4, 2001, 1:40am UTC](https://boards.straightdope.com/t/how-do-i-make-a-wav-file-play-when-i-open-a-file/67465 "2001-06-04T01:40:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![IBBen](https://avatars.discourse-cdn.com/v4/letter/i/85f322/32.png) [@IBBen](https://boards.straightdope.com/u/IBBen)\
**Post date:** [June 4, 2001, 1:40am UTC](https://boards.straightdope.com/t/how-do-i-make-a-wav-file-play-when-i-open-a-file/67465/1 "2001-06-04T01:40:30Z")

</div>

This from the helpful (but confusing) [http://www.onecomputerguy.com](http://www.onecomputerguy.com)

> [@](#):
>
> You can assign a different .wav file to play when you open any folder in windows explorer.
> 
> You must know a litle html  
> Create a .wav or midi file or use one you already have.  
> Save the file to the C: drive in any directory.  
> Go to Windows Explorer and highlight the folder  
> Click View on the toolbar and choose Customize this Folder.  
> Click Create or edit an HTML document.  
> Click next and click next again.  
> Now just insert your html code for your file and then save.  
> Go to your folder and it should play your file

Anybody have a clue what the HTML code would be and where exactly I might insert it?

Thanks in advance,

Ben

---

<div class="post-metadata">

**Author:** ![CnoteChris](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@CnoteChris](https://boards.straightdope.com/u/CnoteChris)\
**Post date:** [June 4, 2001, 1:57am UTC](https://boards.straightdope.com/t/how-do-i-make-a-wav-file-play-when-i-open-a-file/67465/2 "2001-06-04T01:57:03Z")

</div>

Huh? Those directions are goofy. It’s pretty easy to associate a .wav sound with an event.

For me, in Windows 98 (What are you using again?), I go into start-\> settings-\> control panel-\> sounds and highlight the event I want a sound for. In my case, I put my added wave files into the Media file within windows (It’s where they all reside). If it’s not there and is somewhere else, simply click browse in that window and hunt down where that .wav file is at.

---

<div class="post-metadata">

**Author:** ![IBBen](https://avatars.discourse-cdn.com/v4/letter/i/85f322/32.png) [@IBBen](https://boards.straightdope.com/u/IBBen)\
**Post date:** [June 4, 2001, 2:04am UTC](https://boards.straightdope.com/t/how-do-i-make-a-wav-file-play-when-i-open-a-file/67465/3 "2001-06-04T02:04:05Z")

</div>

I am also using Win98. I am not trying to assign a .wav file to an event, this is easily accomplished through the Control Panel as you mentioned. I am trying to assign a .wav file to a particular folder. For example: fart.wav plays when I open Netscape 🙂

---

<div class="post-metadata">

**Author:** ![CnoteChris](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@CnoteChris](https://boards.straightdope.com/u/CnoteChris)\
**Post date:** [June 4, 2001, 3:18am UTC](https://boards.straightdope.com/t/how-do-i-make-a-wav-file-play-when-i-open-a-file/67465/4 "2001-06-04T03:18:37Z")

</div>

Ahh… now I see what you’re after. Good luck. I was trying to do that same thing myself, a while back, without much luck.

The best I can do is offer you the link to the thread where I brought it [\<here\>](http://boards.straightdope.com/sdmb/showthread.php?threadid=47829). It had some good ideas and some suggestions, but I gave up on trying to get it to work soon after the last post.

Maybe someone will know more now.

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [June 4, 2001, 3:20am UTC](https://boards.straightdope.com/t/how-do-i-make-a-wav-file-play-when-i-open-a-file/67465/5 "2001-06-04T03:20:10Z")

</div>

\<BGSOUND SRC=“file.mid”\> or file.wav or whatever

---

<div class="post-metadata">

**Author:** ![CnoteChris](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@CnoteChris](https://boards.straightdope.com/u/CnoteChris)\
**Post date:** [June 4, 2001, 3:23am UTC](https://boards.straightdope.com/t/how-do-i-make-a-wav-file-play-when-i-open-a-file/67465/6 "2001-06-04T03:23:42Z")

</div>

Shibber me timbers!

You had posted to that thread I linked to. I didn’t notice that until just now as I was re-reading through it.

Oh, well.

---

<div class="post-metadata">

**Author:** ![IBBen](https://avatars.discourse-cdn.com/v4/letter/i/85f322/32.png) [@IBBen](https://boards.straightdope.com/u/IBBen)\
**Post date:** [June 4, 2001, 3:59am UTC](https://boards.straightdope.com/t/how-do-i-make-a-wav-file-play-when-i-open-a-file/67465/7 "2001-06-04T03:59:15Z")

</div>

> [@](#):
>
> \*Originally posted by sailor \*  
> \*\* \<BGSOUND SRC=“file.mid”\> or file.wav or whatever \*\*

I will express my ignorance when I ask: Where do I insert this code?

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [June 4, 2001, 4:32am UTC](https://boards.straightdope.com/t/how-do-i-make-a-wav-file-play-when-i-open-a-file/67465/8 "2001-06-04T04:32:31Z")

</div>

\<HTML\>\<HEAD\>\</HEAD\>\<BODY\>\<BGSOUND SRC=“file.mid”\>\</BODY\>\</HTML\>

That’s the entire HTML document you need
