• it depends on the details, but regardless, you have to generate the list of commands from some place; the msdb backup history from production, or the folder full of files, or some other method.

    it gets more complex depending on what you need to do...last full backup, or do you need to applu full/diff/log backups on a per database bassis...that's going to depend on naming conventions, most likely.

    this link was one of the first i googled that had a decent example; this is assumine one full backup per database exist sint he folder:

    http://stackoverflow.com/questions/22207519/need-help-to-restore-multiple-databases-bak-files-from-one-folder

    the more info you provide, the more we can help you.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!