Currently I have to specify FILE= (which backup set) when I write a restore script
USE master
RESTORE database [db] FROM DISK=N'filepath' WITH FILE=1(sometimes can be 2 or 3 ,depending on the latest backup set)
Is there an easier way to get file no without creating an inserting the table as follows?
http://stackoverflow.com/questions/2543920/restore-latest-backup-from-bak-file-with-script