This script generates a snapshot of your database with two variable inputs; database name, and snapshot name appended.
The snapshot will be named @SourceDatabase + '_' + @SnapshotAppend
You can also override the file path using @FilePath.
Use the @Debug variable to print the output first for review.
The script will error if the database or the DATA file path doesn't exist.
Tested on SQL Server 2012