I'm having a problem setting the working directory. I want to do some computation and save my data at one location (D), but in the code below you can see that mathematica shifts automatically to a different location (C). How to use D partition for calculating if mathematica is installed on C?
When I run the code shown below, the file is saved on D but first it is saved on C and on C I don't have enough space.
In[7]:= ResetDirectory[]
"C:\\Users\\user\\Documents"
In[8]:= DirectoryStack[]
Out[8]= {}
In[10]:= SetDirectory["D:\\"]
Out[10]= "D:\\"
A:=5;
Export["A.wdx", A];
In[13]:= DirectoryStack[]
{"C:\\Users\\user\\Documents"}
$TemporaryDirectory
? $\endgroup$SetDirectory["D:\\"]
toSetDirectory[$TemporaryDirectory]
and rerun the whole program? $\endgroup$