I am trying to use a server to do a set of computations for me, and then export the results as a csv to the server to then be transferred to my own computer. I am having trouble exporting files by remotely running a script. I have a .nb file
a = 1;Export[Directory[] <> "/a.csv", a]
Then I transfer the file to the server and with wolframescript run the script:
$ wolframescript -script /location/filename.nb
I expect a file called a.csv to appear in the directory the .nb file is saved in yet it doesn't. I have tried -run and -file and none of them work either. I have also tried a .wl file and it also doesn't work. What am I doing wrong?