I am in need of a special SQL restore script. Basically, I have a drive with all my .bak files - I want to restore all these databases and place them in a different drive in the same manner.
Example:
Backups
E:\Backups\21221\[login to view URL] - Each backup is in its own directory on the drive
Restore
D:\Data\21221\[login to view URL] and .ldf - the database restored will be in its own directory as well.
This is on a Microsoft SQL Server 2012 Enterprise version.