Fsenorin, you've probably mixed up so called substituting variable with bind variable. They are quite different. I'm not sure which one is asked about but your advice is not correct: just try.
To spool to the file you may spool its name to some command file and then run this file. Something like
set heading off
set serverout off
VARIABLE var1 VARCHAR2(200)
VARIABLE file VARCHAR2(100)
exec :file := 'text.txt'
exec :var1 := 'spool '||:file||chr(10)||'@your_report'||chr(10)||'spool off';
spool cmd.sql
print var1
spool off
@cmd
If you mean substituting variable - just pass it to your script, spooling to &&1.