If you want to copy hundreds of files to another directory with duplicate names, but do not want to overwrite the original files, you can use the command line switch to complete the requirement.
Http://sunxiunan.com /? P = 1737
But I have already started copying and want to use the interface. What should I do? (Too tangled !)
Fortunately, we can use python.
Http://www.tizmoi.net/watsup/intro.html
Http://www.brunningonline.net/simon/blog/archives/winGuiAuto.py.html
The main design idea is to use Windows API to find a specific window and then send a keyboard or mouse message.
Watsup I used python2.6, installed pywin32, And the sendkeys library. Finally, download watsup and unzip it to the python lib directory.
CodeVery simple. I slightly modified winguiauto and added the plain text parameter. Because the original wantedtext uses (wantedtextintargetwindows), as long as "no" is returned in the string, it is not the same as what I want to achieve. Of course, you can also use selectionfunction to add lambda, but I don't want to bother.
From watsup. winguiauto import findcontrol, findtopwindow, clickbutton
From time import sleep
Awindow = findtopwindow (wantedtext ='Confirm file replace')
WhileAwindow:
Button = findcontrol (awindow, plain text ='No')
Sleep (0.1)
Clickbutton)
Sleep (1)
Awindow = findtopwindow (wantedtext ='Confirm file replace')
If you use Ruby, you can refer to this article and use related Windows APIs.
http://rubyonwindows.blogspot.com/2007/05/automating-applications-with-ruby.html