In SQPlus you can dynamically set the spool file:
COLUMN script_name new_val script_name
SELECT ‘&file_path’ AS script_name FROM dual;
SPOOL &script_name
SELECT * FROM dual;
SPOOL OFF
Previous post: Find the Oracle Default Tablespaces
Next post: Ignore accents in Oracle queries