For SVF/XSVF playback, refer to (Xilinx Answer 51856).
To generate a file for indirect programming, repeat the normal process and add the SPI/BPI flash. The Create SVF File... step to start the SVF can be performed immediately before starting the programming step and SVF writing can be stopped immediately after.
The SVF file will record the commands exactly as they appear as transitions in the JTAG chain. It will also record the command line operations used within the SVF itself, which can be read with a text editor.