As far as I know there is no way to do this with attaching (since attach requires all files to be present). Also look at this answer.
There is alternative though. If your database is in full recovery mode you can take partial backup without filestream group. You can then restore from that backup and any missing filegroup will be in offline mode and inaccessible. Any query that will try to use objects from missing filegroup will fail.
Sample commands:
BACKUP DATABASE [Demo]
FILEGROUP = N'PRIMARY'
TO DISK = N'.\MSSQL\Backup\Demo.bak'
WITH COPY_ONLY, NOFORMAT, NOINIT, NAME = N'Demo-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
RESTORE DATABASE [OtherDatabase]
FILE = N'Demo' FROM DISK = N'.\MSSQL\Backup\Demo.bak' WITH FILE = 1,
MOVE N'Demo' TO N'.\MSSQL\DATA\OtherDatabase.mdf',
MOVE N'Demo_log' TO N'.\MSSQL\DATA\OtherDatabase_Log.ldf',
MOVE N'FStream' TO N'.\MSSQL\DATA\OtherDatabase_Documents', NOUNLOAD, STATS = 10
GO
EDIT:
Some additional helpful links regarding backing and restoring files/filegroups:
EDIT 2:
If your database is in simple recovery mode and you want to take backup of only specific filegroups, you have to make all other filegroups readonly. Then you can use READ_WRITE_FILEGROUPS to backup only R/W filegroups.
Sample commands:
USE [master]
GO
ALTER DATABASE [Demo] MODIFY FILEGROUP [FilestreamGroup] READONLY
GO
BACKUP DATABASE [Demo] READ_WRITE_FILEGROUPS TO DISK = N'.\MSSQL\Backup\EFCoreDemo.bak'
WITH COPY_ONLY, NOFORMAT, NOINIT, NAME = N'Demo-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
ALTER DATABASE [Demo] MODIFY FILEGROUP [FilestreamGroup] READ_WRITE
GO
RESTORE DATABASE [OtherDatabase]
FILE = N'Demo' FROM DISK = N'.\MSSQL\Backup\EFCoreDemo.bak' WITH FILE = 1,
MOVE N'Demo' TO N'.\MSSQL\DATA\OtherDatabase.mdf',
MOVE N'Demo_log' TO N'.\MSSQL\DATA\OtherDatabase_Log.ldf',
MOVE N'FStream' TO N'.\MSSQL\DATA\OtherDatabase_Documents', NOUNLOAD, STATS = 10
GO