New question #658471 on Sikuli:
https://answers.launchpad.net/sikuli/+question/658471

Hi,

I am using the below code to append time stamp to my file name

import shutil 
stime = time.strftime("%x,%X")
print stime
img = Screen(0).capture(11,30,1888,995).getFile()
shutil.move(img, 'C:\Sikuli\ManApp scripts\Imagelogs\MI' + stime + '.png')


When i execute the above code i get the following error :

[error] IOError ( [Errno 13] Permission denied: 'C:\\Sikuli\\ManApp 
scripts\\Imagelogs\\MI09/21/17,10:48:28.png' )
[error] --- Traceback --- error source first line: module ( function ) 
statement 71: shutil ( copyfile ) IOError: [Errno 13] Permission denied: 
'C:\\Sikuli\\ManApp scripts\\Imagelogs\\MI09/21/17,10:48:28.png'
301: shutil ( move ) File "C:\Sikuli\sikulix.jar\Lib\shutil.py", line 130, in 
copy2
[error] --- Traceback --- end --------------



I have tried using this which works , but  need a better format for date and 
time so used the above method:

shutil.move(img, '/Users/Log/img_' + str(time.time()) + '.png')


Please help.
Thanks in advance

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to