← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #631918]: rename file with batch command

 

Question #631918 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/631918

    Status: Open => Answered

RaiMan proposed the following answer:
Python Grundwissen ;-)

\ in strings must be either escaped as \\ or it must be a raw String:

either:
src = "C:\\Users\\Murph\\xxx_yyy_.jpg"

or
src = r"C:\Users\Murph\xxx_yyy_.jpg"

BTW: for renaming files, there are Python builtin functions
https://www.tutorialspoint.com/python/os_rename.htm

module os is already imported in Sikuli scripts.

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