Export to csv does not work properly?

Hello,

Some time ago I have done a few simulations where I wanted to get a csv file of some specific signals for further processing. To do this, I have used the following command:

.system %QUX% -Export “%RAWFILE%” V(sin), I(R1) all CSV

After revisiting these simulations today I can’t get the csv in the same folder as the .qraw file any more. Instead the csv file is being saved in some random temp file in this location:
C:\Users\xxxx\AppData\Local\Temp\tmpFE74.csv

Attached is a very basic circuit for testing.

Is this a bug or the command has been changed and I didn’t notice?

testcircuit.qsch (1.6 KB)

@toms,
This is not the most elegant solution but try this:

Replace your .system line with =>
.system %QUX% -Export “%RAWFILE%” V(sin), I(R1) all CSV -stdout >%CD%\Out.csv

It will store the CSV file with the name Out.csv to the current working directory. Apparently using the -stdout argument and redirecting the output using the “>” to %CD%<filename> was my answer.

It worked for me.

Len

1 Like

Thanks for the help.
It works but it doesn’t get the same file name automatically as the previous comand. I can live with this, I just need to adjust my script to either rename it or use a specific name.

@toms
Update QSpice and the exported file will save to the working directory.
07/10/2026 Improved computation of a new file name for exported data.

2 Likes

@lpoma This is a great way to export files with a user-specified filename. Adding quotes (" ") around %CD% can preserve whitespace in the directory path and its specified file name (if any).
.system %QUX% -Export "%RAWFILE%" V(sin), I(R1) all CSV -stdout>"%CD%\Out.csv"

1 Like