First I set


and then I quite the kernel:


an then


it output the "C:\\Users\\Administrator\\Documents". So how can I modify Directory[] permanently?


You can run SetDirectory in the kernel initialization file, init.m. You'll find it here:

SystemOpen@FileNameJoin[{$UserBaseDirectory, "Kernel"}]
| improve this answer | |
  • $\begingroup$ You mean to say that I add SetDirectory["F:\\learning_mma"] in the init.m? $\endgroup$ – partida Oct 2 '14 at 3:14
  • 1
    $\begingroup$ Oh successful! thank you! $\endgroup$ – partida Oct 2 '14 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.