Hi everyone,
I have this really simple Python script, that basically copies a file:
When I run it on a Windows Server 2008 R2 64Bit both through command line and as a scheduled task, it does what it's suppose to do.
When I import the arcpy module, then the "fun" begins. I'm only able to run it as a schedule task if:
Any help would be appreciated!
Thanks,
Tiago
I have this really simple Python script, that basically copies a file:
Code:
import os, shutil, time
originalSDDraft = "C:\\Esri\\test.sddraft"
localtime = time.localtime(time.time())
filesPath = os.path.dirname(originalSDDraft)
sddraftFile = filesPath + '\\' + str(localtime.tm_min) + str(localtime.tm_sec) + os.path.basename(originalSDDraft).replace('.sddraft','_copy.sddraft')
if os.path.isfile(sddraftFile):
os.remove(sddraftFile)
shutil.copy(originalSDDraft,sddraftFile)When I import the arcpy module, then the "fun" begins. I'm only able to run it as a schedule task if:
- "Run only when user is logged on" is selected.
- The user has administrator privileges.
Any help would be appreciated!
Thanks,
Tiago