This script will generate scripts to create each database on a sever for attach. It handles multiple files, multiple files, multiple files on a filegroup and multiple log files. It will also handle the creation of filestream filegroups. There is a parameter to attach the logs or create the databases for attach with rebuild log. Run the output to text for easy copy and paste.