2

I saw the info on finding the name of my temp directory in this question.

The problem I'm having is that my Appdata/Local/temp/[Rtmpxxxx] directory is being deleted during an R session longer than 1 or 2 days. I have turned off all automatic temp deletion actions that Windows 10 can take. There's nothing in Rprofile.site or .Renviron related to temp directory or files.

Any ideas what I need to turn off or modify to keep the Rtmp directory from being deleted?

Carl Witthoft
  • 20,573
  • 9
  • 43
  • 73
  • Could you elaborate on exactly what `automatic temp deletion` you turned off and how? Also, I believe Storage Sense will self-activate in cases of low disk space - what is your disk space situation (on the %APPDATA% disk)? – Ohad Schneider Sep 11 '20 at 13:44
  • @OhadSchneider definitely not a disk space issue - I had less than 50% usage. This being 18 months later, I fear I can't recall specifically what I turned off. I did not know about "Storage Sense, but I see my CorporateOverlords forced it to "During low free disk space" . that shouldn't have mattered, but.... – Carl Witthoft Sep 11 '20 at 14:51
  • Storage Sense doesn't necessarily run only on low disk space, it can be configured to run as often as every day. Could you check how your corporate admins configured it? https://imgur.com/a/JQaIeuE – Ohad Schneider Sep 11 '20 at 20:22

1 Answers1

1

You could move your temp directory to another folder (outside the win10 temp folder) e.g. with write("TMP = '<your-desired-tempdir>'", file=file.path(Sys.getenv('R_USER'), '.Renviron'))

If it is still being deleted, it is rather unlikely that Win10 deletes it.

edit by the OP

Depending on [something mysterious], the same command above should be used to create TEMP and TMPDIR as discussed here

Community
  • 1
  • 1
ava
  • 840
  • 5
  • 19