There is an [if|case] -file fname conditional to do this function,
although I am in the middle of recoding a lot of the file pathname
processing in Bayonne for 0.7.0. This was to make sure it deals
correctly with fully qualified and resolved absolute paths at all times.
For your example, maybe you might use something like:
menudef
speak enterdoctornum.au
input docnum count=2 timeout=10s
endmenu
call doctors docnum=%num
function doctors
set %docfile {dr} %docnum {.au}
if -file %docfile
then
play thenameofdocis.au
play %docfile
else
play nosuchdoc.au
endif
[EMAIL PROTECTED] wrote:
Hi everyone. Is there any function in ccScript that lets me check for the
existence of an audio file?
I want my code to do something like this:
if FileExists("dr34.au") # file contains the name of doctor n° 34.
then
play TheNameOfTheDoctorIs.au
play dr34.au
else
play DoctorDoesntExist.au
endif
Thank you all
Roberto from Mendoza, Argentina
_______________________________________________
Bayonne-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bayonne-devel
begin:vcard
fn:David Sugar
n:Sugar;David
org:GNU Telephony
adr:;;;;;;USA
email;internet:[EMAIL PROTECTED]
x-mozilla-html:FALSE
url:http://www.gnutelephony.org
version:2.1
end:vcard
_______________________________________________
Bayonne-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bayonne-devel