I agree with Jens..

If we go over to SQLTeam.. We see a pretty good script example -
Database Backup Script

Also - here is the search string too:
http://www.sqlteam.com/searchresults.asp?SearchTerms=backup

HTH,

Kent

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's