Move the Results Window log file from C drive

01-29-2014 06:51 AM
by Anonymous User
Not applicable
Original User: rdg129

I work on a "frozen" computer that the C drive is overwritten every night.  Is there anyway to move the results windows log file away from the C drive to a seperate location?
0 Kudos
1 Reply
by Anonymous User
Not applicable
Original User: ldanzinger

The help indicates it goes to C:\Users\<user name>\AppData\(Local or LocalLow or Roaming)\ESRI\Desktop10.1\ArcToolbox\History, and I can't see any way to switch this. Maybe you could use a Python script, similar to the following, and set it up to run as a scheduled task each day.

import os
import shutil

#get the location of the result files
localProfile = os.getenv("APPDATA")
ArcMapVersion = "10.2"
inGPResultFiles = os.path.join(localProfile, r"ESRI\Desktop" + ArcMapVersion, r"ArcToolbox\History")

#set output location
outGPResultFiles = r"C:\Temp"

#loop through result XML files and copy
for result in os.listdir(inGPResultFiles):
    shutil.copyfile(os.path.join(inGPResultFiles, result), os.path.join(outGPResultFiles, result))
0 Kudos