While SQLCMD.exe is the best way, SSMS also has a SQLCMD mode where you can execute a SQLCMD script. To enable this mode click Query in menu bar then select SQLCMD Mode.
The ":r filename.sql" command is the SQLCMD script command to import and execute a sql script file. You know you are in SQLCMD mode because any lines that are SQLCMD script commands will appear with colored (gray I think) background.
:setvar path "c:Path_to_scripts"
:r $(path)file1.sql
:r $(path)file2.sql
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…