# Verifying File Name for Programmer Instrument

**URL:** https://qa.fmod.com/t/verifying-file-name-for-programmer-instrument/19777
**Category:** FMOD Engine
**Created:** [January 24, 2023, 6:11am UTC](https://qa.fmod.com/t/verifying-file-name-for-programmer-instrument/19777 "2023-01-24T06:11:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ivyvyx116](https://avatars.discourse-cdn.com/v4/letter/i/e19b73/32.png) [@ivyvyx116](https://qa.fmod.com/u/ivyvyx116)
#### Post date: [January 24, 2023, 6:11am UTC](https://qa.fmod.com/t/verifying-file-name-for-programmer-instrument/19777/1 "2023-01-24T06:11:30Z")

</div>

Hi, I’m using FMOD Programmer Instrument for VO playback in our game.  
The code to use this programmer sound was just mostly copied and pasted from the documentation  
page below with minimal adjustment, because I don’t completely understand what each line does.  
[https://www.fmod.com/docs/2.00/unity/examples-programmer-sounds.html](https://www.fmod.com/docs/2.00/unity/examples-programmer-sounds.html)

Some lines are not dubbed in the game. Is there an efficient way of C# code to check whether the file name is a valid input with a corresponding audio file, before actually making the call to play it?

---

<div class="post-metadata">

### Author: ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)
#### Post date: [January 27, 2023, 3:28am UTC](https://qa.fmod.com/t/verifying-file-name-for-programmer-instrument/19777/2 "2023-01-27T03:28:13Z")

</div>

Hi,

You could call `System.IO.File.Exists("audio\\file\\path")` which will return true if the file exists.

Hope this helps!

---

<div class="post-metadata">

### Author: ![ivyvyx116](https://avatars.discourse-cdn.com/v4/letter/i/e19b73/32.png) [@ivyvyx116](https://qa.fmod.com/u/ivyvyx116)
#### Post date: [February 1, 2023, 9:28am UTC](https://qa.fmod.com/t/verifying-file-name-for-programmer-instrument/19777/3 "2023-02-01T09:28:55Z")

</div>

And if anyone else using Unity and needs the extra hint:  
`System.IO.File.Exists(Application.streamingAssetsPath + "fileName")` might save you some time.
