Restore most current backup.
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.