Hi, I have a server that keeps 3 days of full backups on disk. Occasionally I need to restore the most current full backup in test and dev. Backup files are named like this
"FULL_(local)_MYBACKUP_20080701_203440.sqb".
Every backup file has the date and time appended to it.
I would like to be able to run a T-SQL command that will find the most current full backup in the directory. Currently I need to change the file name every time I need to restore. My goal is to setup a SQL agent job that will restore the backup in test and dev without any changes to the restore script. Any ideas or ways to do this are appreciated.
Thanks